diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/slider.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/slider.js b/ui/slider.js index b40a35e66..131f93fb0 100644 --- a/ui/slider.js +++ b/ui/slider.js @@ -440,6 +440,9 @@ return $.widget( "ui.slider", $.ui.mouse, { this._removeClass( "ui-slider-horizontal ui-slider-vertical" ) ._addClass( "ui-slider-" + this.orientation ); this._refreshValue(); + if ( this.options.range ) { + this._refreshRange( value ); + } // Reset positioning from previous orientation this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); @@ -564,6 +567,15 @@ return $.widget( "ui.slider", $.ui.mouse, { return this.max; }, + _refreshRange: function ( orientation ) { + if ( orientation === "vertical" ) { + this.range.css( { "width": "", "left": "" } ); + } + if ( orientation === "horizontal" ) { + this.range.css( { "height": "", "bottom": "" } ); + } + }, + _refreshValue: function() { var lastValPercent, valPercent, value, valueMin, valueMax, oRange = this.options.range, |