]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: Fix line length issues
authorAlexander Schmitz <arschmitz@gmail.com>
Thu, 31 Mar 2016 02:18:36 +0000 (22:18 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 13 Apr 2016 15:31:38 +0000 (11:31 -0400)
Ref gh-1690

ui/widgets/slider.js

index 8af032dcf59e43452ad67bf1b66ec2d520f4ff0f..4c1bdc05e30e464d7f335ce7700402f6e2943b47 100644 (file)
@@ -274,10 +274,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
 
                if ( this.orientation === "horizontal" ) {
                        pixelTotal = this.elementSize.width;
-                       pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
+                       pixelMouse = position.x - this.elementOffset.left -
+                               ( this._clickOffset ? this._clickOffset.left : 0 );
                } else {
                        pixelTotal = this.elementSize.height;
-                       pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
+                       pixelMouse = position.y - this.elementOffset.top -
+                               ( this._clickOffset ? this._clickOffset.top : 0 );
                }
 
                percentMouse = ( pixelMouse / pixelTotal );
@@ -595,23 +597,38 @@ return $.widget( "ui.slider", $.ui.mouse, {
 
                if ( this._hasMultipleValues() ) {
                        this.handles.each( function( i ) {
-                               valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
+                               valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
+                                       that._valueMin() ) * 100;
                                _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
                                $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
                                if ( that.options.range === true ) {
                                        if ( that.orientation === "horizontal" ) {
                                                if ( i === 0 ) {
-                                                       that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
+                                                       that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                                               left: valPercent + "%"
+                                                       }, o.animate );
                                                }
                                                if ( i === 1 ) {
-                                                       that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+                                                       that.range[ animate ? "animate" : "css" ]( {
+                                                               width: ( valPercent - lastValPercent ) + "%"
+                                                       }, {
+                                                               queue: false,
+                                                               duration: o.animate
+                                                       } );
                                                }
                                        } else {
                                                if ( i === 0 ) {
-                                                       that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
+                                                       that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                                               bottom: ( valPercent ) + "%"
+                                                       }, o.animate );
                                                }
                                                if ( i === 1 ) {
-                                                       that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+                                                       that.range[ animate ? "animate" : "css" ]( {
+                                                               height: ( valPercent - lastValPercent ) + "%"
+                                                       }, {
+                                                               queue: false,
+                                                               duration: o.animate
+                                                       } );
                                                }
                                        }
                                }
@@ -628,16 +645,24 @@ return $.widget( "ui.slider", $.ui.mouse, {
                        this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
 
                        if ( oRange === "min" && this.orientation === "horizontal" ) {
-                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
+                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                       width: valPercent + "%"
+                               }, o.animate );
                        }
                        if ( oRange === "max" && this.orientation === "horizontal" ) {
-                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, o.animate );
+                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                       width: ( 100 - valPercent ) + "%"
+                               }, o.animate );
                        }
                        if ( oRange === "min" && this.orientation === "vertical" ) {
-                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
+                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                       height: valPercent + "%"
+                               }, o.animate );
                        }
                        if ( oRange === "max" && this.orientation === "vertical" ) {
-                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, o.animate );
+                               this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
+                                       height: ( 100 - valPercent ) + "%"
+                               }, o.animate );
                        }
                }
        },