diff options
Diffstat (limited to 'ui/widgets/selectable.js')
-rw-r--r-- | ui/widgets/selectable.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ui/widgets/selectable.js b/ui/widgets/selectable.js index ed980cc49..b8e29517c 100644 --- a/ui/widgets/selectable.js +++ b/ui/widgets/selectable.js @@ -15,6 +15,8 @@ //>>css.structure: ../../themes/base/selectable.css ( function( factory ) { + "use strict"; + if ( typeof define === "function" && define.amd ) { // AMD. Register as an anonymous module. @@ -29,7 +31,8 @@ // Browser globals factory( jQuery ); } -}( function( $ ) { +} )( function( $ ) { +"use strict"; return $.widget( "ui.selectable", $.ui.mouse, { version: "@VERSION", @@ -183,8 +186,12 @@ return $.widget( "ui.selectable", $.ui.mouse, { x2 = event.pageX, y2 = event.pageY; - if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; } - if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; } + if ( x1 > x2 ) { + tmp = x2; x2 = x1; x1 = tmp; + } + if ( y1 > y2 ) { + tmp = y2; y2 = y1; y1 = tmp; + } this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } ); this.selectees.each( function() { @@ -307,4 +314,4 @@ return $.widget( "ui.selectable", $.ui.mouse, { } ); -} ) ); +} ); |