aboutsummaryrefslogtreecommitdiffstats
path: root/ui/widgets/selectable.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2021-06-07 00:58:12 +0200
committerGitHub <noreply@github.com>2021-06-07 00:58:12 +0200
commit70dae67b73dfea9126f126f516fe8286f1e73417 (patch)
treee61eafab41ee74330fecf1da2ce125050cfac49b /ui/widgets/selectable.js
parenta12c98574d07f002fd59d166f9fc1fd391581b91 (diff)
downloadjquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.tar.gz
jquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.zip
Build: Migrate from JSHint & JSCS to ESLint
Fixes #15393 Closes gh-1958
Diffstat (limited to 'ui/widgets/selectable.js')
-rw-r--r--ui/widgets/selectable.js15
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, {
} );
-} ) );
+} );