Ticket #2500: ui-slider-moveTo.patch
File ui-slider-moveTo.patch, 1.2 KB (added by , 14 years ago) |
---|
-
ui/ui.slider.js
237 237 if(handle == undefined && !this.currentHandle && this.handle.length != 1) return false; //If no handle has been passed, no current handle is available and we have multiple handles, return false 238 238 if(handle == undefined && !this.currentHandle) handle = 0; //If only one handle is available, use it 239 239 if(handle != undefined) this.currentHandle = this.previousHandle = $(this.handle[handle] || handle); 240 241 if(value.constructor == String) value = /\-\=/.test(value) ? this.value() - parseInt(value.replace('-=', ''),10) : this.value() + parseInt(value.replace('+=', ''),10); 240 241 if(value.constructor == String) { 242 if (/^\-\=/.test(value) ) { 243 value = this.value() - parseInt(value.replace('-=', ''), 10) 244 } else if (/^\+\=/.test(value) ) { 245 value = this.value() + parseInt(value.replace('+=', ''), 10) 246 } else { 247 value = parseInt(value, 10); 248 } 249 } 250 242 251 if(o.stepping) value = Math.round(value / o.stepping) * o.stepping; 243 252 value = this.translateValue(value); 244 253