Skip to content
Permalink
Browse files

Slider: Removed support for auto orientation, set default to horizont…

…al. Fixed #4174.
  • Loading branch information...
scottgonzalez committed Feb 18, 2009
1 parent f0b9f16 commit f39561cc7f7f951261c2842c579a8168b5b54b6c
Showing with 3 additions and 3 deletions.
  1. +1 −1 tests/unit/slider/slider_defaults.js
  2. +2 −2 ui/ui.slider.js
@@ -9,7 +9,7 @@ var slider_defaults = {
distance: 0,
max: 100,
min: 0,
orientation: 'auto',
orientation: 'horizontal',
range: false,
step: 1,
value: 0,
@@ -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,

0 comments on commit f39561c

Please sign in to comment.
You can’t perform that action at this time.