Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.CursorObserver.js |
— | — | @@ -14,20 +14,23 @@ |
15 | 15 |
|
16 | 16 | setTimeout( function() {
|
17 | 17 | if ( !_this.documentView.$.is(':focus') ) {
|
18 | | - if ( _this.anchorNode !== null
|
19 | | - || _this.anchorOffset !== null
|
20 | | - || _this.focusNode !== null
|
21 | | - || _this.focusOffset !== null ) {
|
22 | | - _this.anchorNode = _this.anchorOffset = _this.focusNode = _this.focusOffset = null;
|
23 | | - _this.emit( 'change', null )
|
| 18 | + if (
|
| 19 | + _this.anchorNode !== null ||
|
| 20 | + _this.anchorOffset !== null ||
|
| 21 | + _this.focusNode !== null ||
|
| 22 | + _this.focusOffset !== null
|
| 23 | + ) {
|
| 24 | + _this.anchorNode = _this.anchorOffset = _this.focusNode = _this.focusOffset = null;
|
| 25 | + _this.emit( 'change', null );
|
24 | 26 | }
|
25 | 27 | } else {
|
26 | 28 | var rangySel = rangy.getSelection(),
|
27 | 29 | range;
|
28 | | - if ( rangySel.anchorNode !== _this.anchorNode
|
29 | | - || rangySel.anchorOffset !== _this.anchorOffset
|
30 | | - || rangySel.focusNode !== _this.focusNode
|
31 | | - || rangySel.focusOffset !== _this.focusOffset ) {
|
| 30 | + if ( rangySel.anchorNode !== _this.anchorNode ||
|
| 31 | + rangySel.anchorOffset !== _this.anchorOffset ||
|
| 32 | + rangySel.focusNode !== _this.focusNode ||
|
| 33 | + rangySel.focusOffset !== _this.focusOffset
|
| 34 | + ) {
|
32 | 35 | _this.anchorNode = rangySel.anchorNode;
|
33 | 36 | _this.anchorOffset = rangySel.anchorOffset;
|
34 | 37 | _this.focusNode = rangySel.focusNode;
|
— | — | @@ -41,7 +44,7 @@ |
42 | 45 | _this.getOffset( _this.focusNode, _this.focusOffset )
|
43 | 46 | );
|
44 | 47 | }
|
45 | | - _this.emit( 'change', range )
|
| 48 | + _this.emit( 'change', range );
|
46 | 49 | }
|
47 | 50 | }
|
48 | 51 | }, 0 );
|
— | — | @@ -92,4 +95,4 @@ |
93 | 96 |
|
94 | 97 | /* Inheritance */
|
95 | 98 |
|
96 | | -ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter ); |
\ No newline at end of file |
| 99 | +ve.extendClass( ve.ce.CursorObserver , ve.EventEmitter );
|
Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Surface.js |
— | — | @@ -163,7 +163,9 @@ |
164 | 164 | sel = rangy.getSelection(), |
165 | 165 | key = sel.getRangeAt(0).toString().replace( /\s/gm, '' ); |
166 | 166 | |
167 | | - _this.clipboard[key] = ve.copyArray( _this.documentView.model.getData( _this.getSelectionRange() ) ); |
| 167 | + _this.clipboard[key] = ve.copyArray( |
| 168 | + _this.documentView.model.getData( _this.getSelectionRange() ) |
| 169 | + ); |
168 | 170 | |
169 | 171 | if ( event.type == 'cut' ) { |
170 | 172 | setTimeout( function() { |
Index: trunk/extensions/VisualEditor/modules/ve/ce/ve.ce.Content.js |
— | — | @@ -104,8 +104,7 @@ |
105 | 105 | '\'': ''', |
106 | 106 | '"': '"', |
107 | 107 | '\n': '<span class="es-contentView-whitespace">¶</span>', |
108 | | - '\t': '<span class="es-contentView-whitespace">⇾</span>', |
109 | | - //' ': ' ' |
| 108 | + '\t': '<span class="es-contentView-whitespace">⇾</span>' |
110 | 109 | }; |
111 | 110 | |
112 | 111 | /* Static Methods */ |
— | — | @@ -248,8 +247,8 @@ |
249 | 248 | view = view.parent; |
250 | 249 | } |
251 | 250 | return view.surfaceView; |
252 | | -} |
| 251 | +}; |
253 | 252 | |
254 | 253 | /* Inheritance */ |
255 | 254 | |
256 | | -ve.extendClass( ve.ce.Content, ve.EventEmitter ); |
\ No newline at end of file |
| 255 | +ve.extendClass( ve.ce.Content, ve.EventEmitter ); |