Index: trunk/extensions/VisualEditor/modules/ve/dm/ve.dm.Surface.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | /** |
3 | 3 | * Creates an ve.dm.Surface object. |
4 | | - * |
| 4 | + * |
5 | 5 | * @class |
6 | 6 | * @constructor |
7 | 7 | * @extends {ve.EventEmitter} |
— | — | @@ -30,12 +30,12 @@ |
31 | 31 | this.selection = null; |
32 | 32 | this.smallStack = []; |
33 | 33 | this.bigStack = []; |
34 | | - this.undoIndex = 0; |
| 34 | + this.undoIndex = 0; |
35 | 35 | }; |
36 | 36 | |
37 | 37 | ve.dm.Surface.prototype.getHistory = function() { |
38 | 38 | 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) }] ); |
40 | 40 | } else { |
41 | 41 | return this.bigStack.slice( 0 ); |
42 | 42 | } |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | |
45 | 45 | /** |
46 | 46 | * Gets the document model of the surface. |
47 | | - * |
| 47 | + * |
48 | 48 | * @method |
49 | 49 | * @returns {ve.dm.DocumentNode} Document model of the surface |
50 | 50 | */ |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | }; |
54 | 54 | |
55 | 55 | /** |
56 | | - * Gets the selection |
57 | | - * |
| 56 | + * Gets the selection |
| 57 | + * |
58 | 58 | * @method |
59 | 59 | * @returns {ve.Range} Current selection |
60 | 60 | */ |
— | — | @@ -63,10 +63,10 @@ |
64 | 64 | |
65 | 65 | /** |
66 | 66 | * Changes the selection. |
67 | | - * |
| 67 | + * |
68 | 68 | * If changing the selection at a high frequency (such as while dragging) use the combine argument |
69 | 69 | * to avoid them being split up into multiple history items |
70 | | - * |
| 70 | + * |
71 | 71 | * @method |
72 | 72 | * @param {ve.Range} selection |
73 | 73 | * @param {Boolean} isManual Whether this selection was the result of a user action, and thus should |
— | — | @@ -81,18 +81,18 @@ |
82 | 82 | this.breakpoint(); |
83 | 83 | } |
84 | 84 | // check if the last thing is a selection, if so, swap it. |
85 | | - this.selection = selection; |
| 85 | + this.selection = selection; |
86 | 86 | this.emit( 'select', this.selection.clone() ); |
87 | 87 | //} |
88 | 88 | }; |
89 | 89 | |
90 | 90 | /** |
91 | 91 | * Applies a series of transactions to the content data. |
92 | | - * |
| 92 | + * |
93 | 93 | * If committing multiple transactions which are the result of a single user action and need to be |
94 | 94 | * part of a single history item, use the isPartial argument for all but the last one to avoid them |
95 | 95 | * being split up into multple history items. |
96 | | - * |
| 96 | + * |
97 | 97 | * @method |
98 | 98 | * @param {ve.dm.Transaction} transactions Tranasction to apply to the document |
99 | 99 | * @param {boolean} isPartial whether this transaction is part of a larger logical grouping of |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | |
119 | 119 | ve.dm.Surface.prototype.undo = function() { |
120 | 120 | this.breakpoint(); |
121 | | - this.undoIndex++ |
| 121 | + this.undoIndex++; |
122 | 122 | if ( this.bigStack[this.bigStack.length - this.undoIndex] ) { |
123 | 123 | var diff = 0; |
124 | 124 | var item = this.bigStack[this.bigStack.length - this.undoIndex]; |