Changeset 5064
- Timestamp:
- 03/17/08 18:03:13 (10 months ago)
- Location:
- trunk/ui
- Files:
-
- 2 modified
-
tests/slider.html (modified) (3 diffs)
-
ui.slider.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ui/tests/slider.html
r5060 r5064 96 96 window.console = { 97 97 log: function() { 98 alert(arguments[0]);98 //alert(arguments[0]); 99 99 } 100 100 } … … 123 123 124 124 $('#slider1').slider({ 125 stepping: 20,125 stepping: 10, 126 126 maxValue: 100, 127 127 minValue: -100, … … 132 132 slide: function(e,ui) { 133 133 $('#slider1_value')[0].value = ui.value; 134 } 134 }, 135 handles: [ 136 {start: -60, min: -100, max: 0}, 137 {start: 10, min: -20, max: 100} 138 ] 135 139 }); 136 140 -
trunk/ui/ui.slider.js
r5060 r5064 236 236 value = this.translateValue(this.value(0) + this.oneStep()); 237 237 } 238 if (this.options.handles) { 239 var handle = this.options.handles[this.handleIndex()]; 240 if (value < this.translateValue(handle.min)) { 241 value = this.translateValue(handle.min); 242 } else if (value > this.translateValue(handle.max)) { 243 value = this.translateValue(handle.max); 244 } 245 } 238 246 return value; 247 }, 248 249 handleIndex: function() { 250 return this.handle.index(this.currentHandle[0]) 239 251 }, 240 252
