@@ -274,10 +274,12 @@ return $.widget( "ui.slider", $.ui.mouse, {
274
274
275
275
if ( this . orientation === "horizontal" ) {
276
276
pixelTotal = this . elementSize . width ;
277
- pixelMouse = position . x - this . elementOffset . left - ( this . _clickOffset ? this . _clickOffset . left : 0 ) ;
277
+ pixelMouse = position . x - this . elementOffset . left -
278
+ ( this . _clickOffset ? this . _clickOffset . left : 0 ) ;
278
279
} else {
279
280
pixelTotal = this . elementSize . height ;
280
- pixelMouse = position . y - this . elementOffset . top - ( this . _clickOffset ? this . _clickOffset . top : 0 ) ;
281
+ pixelMouse = position . y - this . elementOffset . top -
282
+ ( this . _clickOffset ? this . _clickOffset . top : 0 ) ;
281
283
}
282
284
283
285
percentMouse = ( pixelMouse / pixelTotal ) ;
@@ -595,23 +597,38 @@ return $.widget( "ui.slider", $.ui.mouse, {
595
597
596
598
if ( this . _hasMultipleValues ( ) ) {
597
599
this . handles . each ( function ( i ) {
598
- valPercent = ( that . values ( i ) - that . _valueMin ( ) ) / ( that . _valueMax ( ) - that . _valueMin ( ) ) * 100 ;
600
+ valPercent = ( that . values ( i ) - that . _valueMin ( ) ) / ( that . _valueMax ( ) -
601
+ that . _valueMin ( ) ) * 100 ;
599
602
_set [ that . orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%" ;
600
603
$ ( this ) . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( _set , o . animate ) ;
601
604
if ( that . options . range === true ) {
602
605
if ( that . orientation === "horizontal" ) {
603
606
if ( i === 0 ) {
604
- that . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { left : valPercent + "%" } , o . animate ) ;
607
+ that . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
608
+ left : valPercent + "%"
609
+ } , o . animate ) ;
605
610
}
606
611
if ( i === 1 ) {
607
- that . range [ animate ? "animate" : "css" ] ( { width : ( valPercent - lastValPercent ) + "%" } , { queue : false , duration : o . animate } ) ;
612
+ that . range [ animate ? "animate" : "css" ] ( {
613
+ width : ( valPercent - lastValPercent ) + "%"
614
+ } , {
615
+ queue : false ,
616
+ duration : o . animate
617
+ } ) ;
608
618
}
609
619
} else {
610
620
if ( i === 0 ) {
611
- that . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { bottom : ( valPercent ) + "%" } , o . animate ) ;
621
+ that . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
622
+ bottom : ( valPercent ) + "%"
623
+ } , o . animate ) ;
612
624
}
613
625
if ( i === 1 ) {
614
- that . range [ animate ? "animate" : "css" ] ( { height : ( valPercent - lastValPercent ) + "%" } , { queue : false , duration : o . animate } ) ;
626
+ that . range [ animate ? "animate" : "css" ] ( {
627
+ height : ( valPercent - lastValPercent ) + "%"
628
+ } , {
629
+ queue : false ,
630
+ duration : o . animate
631
+ } ) ;
615
632
}
616
633
}
617
634
}
@@ -628,16 +645,24 @@ return $.widget( "ui.slider", $.ui.mouse, {
628
645
this . handle . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( _set , o . animate ) ;
629
646
630
647
if ( oRange === "min" && this . orientation === "horizontal" ) {
631
- this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { width : valPercent + "%" } , o . animate ) ;
648
+ this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
649
+ width : valPercent + "%"
650
+ } , o . animate ) ;
632
651
}
633
652
if ( oRange === "max" && this . orientation === "horizontal" ) {
634
- this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { width : ( 100 - valPercent ) + "%" } , o . animate ) ;
653
+ this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
654
+ width : ( 100 - valPercent ) + "%"
655
+ } , o . animate ) ;
635
656
}
636
657
if ( oRange === "min" && this . orientation === "vertical" ) {
637
- this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { height : valPercent + "%" } , o . animate ) ;
658
+ this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
659
+ height : valPercent + "%"
660
+ } , o . animate ) ;
638
661
}
639
662
if ( oRange === "max" && this . orientation === "vertical" ) {
640
- this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( { height : ( 100 - valPercent ) + "%" } , o . animate ) ;
663
+ this . range . stop ( 1 , 1 ) [ animate ? "animate" : "css" ] ( {
664
+ height : ( 100 - valPercent ) + "%"
665
+ } , o . animate ) ;
641
666
}
642
667
}
643
668
} ,
0 commit comments