Index: trunk/parsers/wikidom/lib/es/es.Surface.js |
— | — | @@ -94,7 +94,6 @@ |
95 | 95 | }; |
96 | 96 | |
97 | 97 | Surface.prototype.onKeyDown = function( e ) { |
98 | | - |
99 | 98 | switch ( e.keyCode ) { |
100 | 99 | case 37: // Left arrow |
101 | 100 | this.initialHorizontalCursorPosition = null; |
— | — | @@ -177,19 +176,19 @@ |
178 | 177 | }; |
179 | 178 | |
180 | 179 | Surface.prototype.onMouseMove = function( e ) { |
181 | | - this.cursor.hide(); |
182 | 180 | if ( e.button === 0 && this.selecting ) { |
| 181 | + this.cursor.hide(); |
183 | 182 | this.selection.to = this.getLocationFromEvent( e ); |
184 | 183 | this.drawSelection(); |
185 | 184 | } |
186 | 185 | }; |
187 | 186 | |
188 | 187 | Surface.prototype.onMouseUp = function( e ) { |
189 | | - if ( e.button === 0 && this.selecting ) { |
190 | | - this.selecting = false; |
| 188 | + if ( e.button === 0 && this.selection.to ) { |
191 | 189 | this.drawSelection(); |
192 | 190 | this.cursor.hide(); |
193 | 191 | } |
| 192 | + this.selecting = false; |
194 | 193 | }; |
195 | 194 | |
196 | 195 | /** |