r99217 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99216‎ | r99217 | r99218 >
Date:16:24, 7 October 2011
Author:inez
Status:deferred
Tags:
Comment:
Small cleanup
Modified paths:
  • /trunk/parsers/wikidom/lib/synth/views/es.SurfaceView.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/synth/views/es.SurfaceView.js
@@ -166,16 +166,14 @@
167167 position = this.documentView.getRenderedPosition( contentOffset );
168168
169169 if ( e.button === 0 ) {
 170+ this.mouse.selecting = true;
 171+ this.showCursor( position );
170172 if ( this.keyboard.keys.shift ) {
171173 this.selection.to = contentOffset;
172174 } else {
173175 this.selection.from = this.selection.to = contentOffset;
174176 }
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();
180178 }
181179
182180 if ( !this.$input.is(':focus') ) {
@@ -272,8 +270,8 @@
273271 };
274272
275273 es.SurfaceView.prototype.drawSelection = function() {
 274+ this.documentView.drawSelection( new es.Range( this.selection.from, this.selection.to ) );
276275 if ( this.selection.from !== this.selection.to ) {
277 - this.documentView.drawSelection( new es.Range( this.selection.from, this.selection.to ) );
278276 return true;
279277 } else {
280278 return false;

Status & tagging log