r112280 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112279‎ | r112280 | r112281 >
Date:00:49, 24 February 2012
Author:rmoen
Status:ok
Tags:
Comment:
minor fixes: removed whitespace, added semicolon
Modified paths:
  • /trunk/extensions/VisualEditor/modules/ve/dm/ve.dm.Surface.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/ve/dm/ve.dm.Surface.js
@@ -1,6 +1,6 @@
22 /**
33 * Creates an ve.dm.Surface object.
4 - *
 4+ *
55 * @class
66 * @constructor
77 * @extends {ve.EventEmitter}
@@ -30,12 +30,12 @@
3131 this.selection = null;
3232 this.smallStack = [];
3333 this.bigStack = [];
34 - this.undoIndex = 0;
 34+ this.undoIndex = 0;
3535 };
3636
3737 ve.dm.Surface.prototype.getHistory = function() {
3838 if ( this.smallStack.length > 0 ) {
39 - return this.bigStack.slice( 0 ).concat( [{ 'stack': this.smallStack.slice(0) }] );
 39+ return this.bigStack.slice( 0 ).concat( [{ 'stack': this.smallStack.slice(0) }] );
4040 } else {
4141 return this.bigStack.slice( 0 );
4242 }
@@ -43,7 +43,7 @@
4444
4545 /**
4646 * Gets the document model of the surface.
47 - *
 47+ *
4848 * @method
4949 * @returns {ve.dm.DocumentNode} Document model of the surface
5050 */
@@ -52,8 +52,8 @@
5353 };
5454
5555 /**
56 - * Gets the selection
57 - *
 56+ * Gets the selection
 57+ *
5858 * @method
5959 * @returns {ve.Range} Current selection
6060 */
@@ -63,10 +63,10 @@
6464
6565 /**
6666 * Changes the selection.
67 - *
 67+ *
6868 * If changing the selection at a high frequency (such as while dragging) use the combine argument
6969 * to avoid them being split up into multiple history items
70 - *
 70+ *
7171 * @method
7272 * @param {ve.Range} selection
7373 * @param {Boolean} isManual Whether this selection was the result of a user action, and thus should
@@ -81,18 +81,18 @@
8282 this.breakpoint();
8383 }
8484 // check if the last thing is a selection, if so, swap it.
85 - this.selection = selection;
 85+ this.selection = selection;
8686 this.emit( 'select', this.selection.clone() );
8787 //}
8888 };
8989
9090 /**
9191 * Applies a series of transactions to the content data.
92 - *
 92+ *
9393 * If committing multiple transactions which are the result of a single user action and need to be
9494 * part of a single history item, use the isPartial argument for all but the last one to avoid them
9595 * being split up into multple history items.
96 - *
 96+ *
9797 * @method
9898 * @param {ve.dm.Transaction} transactions Tranasction to apply to the document
9999 * @param {boolean} isPartial whether this transaction is part of a larger logical grouping of
@@ -117,7 +117,7 @@
118118
119119 ve.dm.Surface.prototype.undo = function() {
120120 this.breakpoint();
121 - this.undoIndex++
 121+ this.undoIndex++;
122122 if ( this.bigStack[this.bigStack.length - this.undoIndex] ) {
123123 var diff = 0;
124124 var item = this.bigStack[this.bigStack.length - this.undoIndex];

Status & tagging log