From f39561cc7f7f951261c2842c579a8168b5b54b6c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 18 Feb 2009 03:00:03 +0000 Subject: [PATCH] Slider: Removed support for auto orientation, set default to horizontal. Fixed #4174. --- tests/unit/slider/slider_defaults.js | 2 +- ui/ui.slider.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/slider/slider_defaults.js b/tests/unit/slider/slider_defaults.js index 285e2b785..14d2f7dc7 100644 --- a/tests/unit/slider/slider_defaults.js +++ b/tests/unit/slider/slider_defaults.js @@ -9,7 +9,7 @@ var slider_defaults = { distance: 0, max: 100, min: 0, - orientation: 'auto', + orientation: 'horizontal', range: false, step: 1, value: 0, diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 2b388c6d5..b304843bf 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -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, -- 2.39.5