r2091 - in trunk: tests/unit/slider ui

r2091 - in trunk: tests/unit/slider ui


Author: scott.gonzalez
Date: Tue Feb 17 19:00:03 2009
New Revision: 2091
Modified:
trunk/tests/unit/slider/slider_defaults.js
trunk/ui/ui.slider.js
Log:
Slider: Removed support for auto orientation, set default to horizontal.
Fixed #4174.
Modified: trunk/tests/unit/slider/slider_defaults.js
==============================================================================
--- trunk/tests/unit/slider/slider_defaults.js    (original)
+++ trunk/tests/unit/slider/slider_defaults.js    Tue Feb 17 19:00:03 2009
@@ -9,7 +9,7 @@
    distance: 0,
    max: 100,
    min: 0,
-    orientation: 'auto',
+    orientation: 'horizontal',
    range: false,
    step: 1,
    value: 0,
Modified: trunk/ui/ui.slider.js
==============================================================================
--- trunk/ui/ui.slider.js    (original)
+++ trunk/ui/ui.slider.js    Tue Feb 17 19:00:03 2009
@@ -259,7 +259,7 @@
    },
    
    _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 @@
        distance: 0,
        max: 100,
        min: 0,
-        orientation: 'auto',
+        orientation: 'horizontal',
        range: false,
        step: 1,
        value: 0,