r2228 - trunk/ui
r2228 - trunk/ui
Author: rdworth
Date: Tue Mar 10 04:17:21 2009
New Revision: 2228
Modified:
trunk/ui/ui.slider.js
Log:
Fixed #4315 (Slider: clicking on slider with negative values causes
error 'closestHandle is undefined')
Modified: trunk/ui/ui.slider.js
==============================================================================
--- trunk/ui/ui.slider.js (original)
+++ trunk/ui/ui.slider.js Tue Mar 10 04:17:21 2009
@@ -193,7 +193,7 @@
var position = { x: event.pageX, y: event.pageY };
var normValue = this._normValueFromMouse(position);
- var distance = this._valueMax() + 1, closestHandle;
+ var distance = this._valueMax() - this._valueMin() + 1, closestHandle;
var self = this, index;
this.handles.each(function(i) {
var thisDistance = Math.abs(normValue - self.values(i));