Skip to main content

Search and Top Navigation

Ticket #3736: 3736.ui.slider.js.3.patch


File 3736.ui.slider.js.3.patch, 0.9 KB (added by andrew_, April 19, 2009 11:39PM UTC)

Fix for values: [0,0] included.

--- C:/Documents and Settings/Andrew/Local Settings/Temp/ui.slider-HEAD.2.js	Sun Apr 19 19:34:55 2009
+++ d:/Subversion/jQuery UI/Trunk/ui/ui.slider.js	Sun Apr 19 19:40:22 2009
@@ -335,9 +335,11 @@
 		if (this.options.values && this.options.values.length) {
 
 			var otherVal = this.values(index ? 0 : 1);
-
-			if ((index == 0 && newVal >= otherVal) || (index == 1 && newVal <= otherVal))
-				newVal = otherVal;
+			
+			if ((this.options.values.length < 3 && this.options.range === true) && 
+				((index == 0 && newVal >= otherVal) || (index == 1 && newVal <= otherVal))){
+ 				newVal = otherVal;
+			}
 
 			if (newVal != this.values(index)) {
 				var newValues = this.values();
@@ -348,7 +350,7 @@
 					value: newVal,
 					values: newValues
 				});
-				var otherVal = this.values(index ? 0 : 1);
+
 				if (allowed !== false) {
 					this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true);
 				}

Download in other formats:

Original Format