Index: trunk/extensions/VisualEditor/modules/es/views/es.ToolbarView.js |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | this.surfaceView.model.on( 'select', function() { |
45 | 45 | _this.updateState(); |
46 | 46 | } ); |
47 | | - this.surfaceView.on( 'update', function() { |
| 47 | + this.surfaceView.on( 'cursor', function() { |
48 | 48 | _this.updateState(); |
49 | 49 | } ); |
50 | 50 | |
Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | |
149 | 149 | es.SurfaceView.prototype.addInsertionAnnotation = function( annotation ) { |
150 | 150 | this.insertionAnnotations.push( annotation ); |
151 | | - this.emitUpdate(); |
| 151 | + this.emit( 'cursor' ); |
152 | 152 | }; |
153 | 153 | |
154 | 154 | es.SurfaceView.prototype.loadInsertionAnnotations = function( annotation ) { |
— | — | @@ -160,6 +160,7 @@ |
161 | 161 | i--; |
162 | 162 | } |
163 | 163 | } |
| 164 | + this.emit( 'cursor' ); |
164 | 165 | }; |
165 | 166 | |
166 | 167 | es.SurfaceView.prototype.removeInsertionAnnotation = function( annotation ) { |
— | — | @@ -167,12 +168,12 @@ |
168 | 169 | if ( index !== -1 ) { |
169 | 170 | this.insertionAnnotations.splice( index, 1 ); |
170 | 171 | } |
171 | | - this.emitUpdate(); |
| 172 | + this.emit( 'cursor' ); |
172 | 173 | }; |
173 | 174 | |
174 | 175 | es.SurfaceView.prototype.clearInsertionAnnotations = function() { |
175 | 176 | this.insertionAnnotations = []; |
176 | | - this.emitUpdate(); |
| 177 | + this.emit( 'cursor' ); |
177 | 178 | }; |
178 | 179 | |
179 | 180 | es.SurfaceView.prototype.getModel = function() { |