r3362 committed - slider: use internal methods _valueMin() and _valueMax()

r3362 committed - slider: use internal methods _valueMin() and _valueMax()


Revision: 3362
Author: rdworth
Date: Mon Oct 12 04:06:57 2009
Log: slider: use internal methods _valueMin() and _valueMax()
http://code.google.com/p/jquery-ui/source/detail?r=3362
Modified:
/trunk/ui/jquery.ui.slider.js
=======================================
--- /trunk/ui/jquery.ui.slider.js    Mon Oct 12 03:50:38 2009
+++ /trunk/ui/jquery.ui.slider.js    Mon Oct 12 04:06:57 2009
@@ -410,8 +410,8 @@
    value: function(newValue) {
        if (arguments.length) {
-            newValue = newValue >= this.options.min ? newValue : this.options.min;
-            newValue = newValue <= this.options.max ? newValue : this.options.max;
+            if (newValue < this._valueMin()) newValue = this._valueMin();
+            if (newValue > this._valueMax()) newValue = this._valueMax();
            this.options.value = newValue;
            this._refreshValue();
            this._change(null, 0);