]> source.dussan.org Git - jquery-ui.git/commitdiff
Slider: Removed support for auto orientation, set default to horizontal. Fixed ...
authorScott González <scott.gonzalez@gmail.com>
Wed, 18 Feb 2009 03:00:03 +0000 (03:00 +0000)
committerScott González <scott.gonzalez@gmail.com>
Wed, 18 Feb 2009 03:00:03 +0000 (03:00 +0000)
tests/unit/slider/slider_defaults.js
ui/ui.slider.js

index 285e2b7859f671f42f8c72a2a94556d01f934e44..14d2f7dc7dc5db049699df3dd8a58279d58c08a7 100644 (file)
@@ -9,7 +9,7 @@ var slider_defaults = {
        distance: 0,
        max: 100,
        min: 0,
-       orientation: 'auto',
+       orientation: 'horizontal',
        range: false,
        step: 1,
        value: 0,
index 2b388c6d5f3c4e47b98b87b7d5e5a8813f1bd79d..b304843bfad416cccf1245be5c253d5ae943a054 100644 (file)
@@ -259,7 +259,7 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, {
        },
        
        _detectOrientation: function() {
-               this.orientation = this.options.orientation == 'auto' ? (this.element[0].offsetWidth/this.element[0].offsetHeight > 1 ? 'horizontal' : 'vertical') : this.options.orientation;
+               this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal';
        },
 
        _normValueFromMouse: function(position) {
@@ -495,7 +495,7 @@ $.extend($.ui.slider, {
                distance: 0,
                max: 100,
                min: 0,
-               orientation: 'auto',
+               orientation: 'horizontal',
                range: false,
                step: 1,
                value: 0,