Index: trunk/parsers/wikidom/lib/synth/views/es.SurfaceView.js |
— | — | @@ -166,16 +166,14 @@ |
167 | 167 | position = this.documentView.getRenderedPosition( contentOffset ); |
168 | 168 | |
169 | 169 | if ( e.button === 0 ) { |
| 170 | + this.mouse.selecting = true; |
| 171 | + this.showCursor( position ); |
170 | 172 | if ( this.keyboard.keys.shift ) { |
171 | 173 | this.selection.to = contentOffset; |
172 | 174 | } else { |
173 | 175 | this.selection.from = this.selection.to = contentOffset; |
174 | 176 | } |
175 | | - |
176 | | - this.showCursor( position ); |
177 | | - this.mouse.selecting = true; |
178 | | - |
179 | | - this.documentView.drawSelection( new es.Range( this.selection.from, this.selection.to ) ); |
| 177 | + this.drawSelection(); |
180 | 178 | } |
181 | 179 | |
182 | 180 | if ( !this.$input.is(':focus') ) { |
— | — | @@ -272,8 +270,8 @@ |
273 | 271 | }; |
274 | 272 | |
275 | 273 | es.SurfaceView.prototype.drawSelection = function() { |
| 274 | + this.documentView.drawSelection( new es.Range( this.selection.from, this.selection.to ) ); |
276 | 275 | if ( this.selection.from !== this.selection.to ) { |
277 | | - this.documentView.drawSelection( new es.Range( this.selection.from, this.selection.to ) ); |
278 | 276 | return true; |
279 | 277 | } else { |
280 | 278 | return false; |