r2007 - trunk/ui
r2007 - trunk/ui
Author: rdworth
Date: Wed Feb 4 22:01:10 2009
New Revision: 2007
Modified:
trunk/ui/ui.slider.js
Log:
Fixed 4062 - slider: vertical slider handle jumps up when you click on it
Modified: trunk/ui/ui.slider.js
==============================================================================
--- trunk/ui/ui.slider.js (original)
+++ trunk/ui/ui.slider.js Wed Feb 4 22:01:10 2009
@@ -214,7 +214,11 @@
var mouseOverHandle
= !$(event.target).parents().andSelf().is('.ui-slider-handle');
this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
left: event.pageX - offset.left +
(parseInt(closestHandle.css('marginLeft'),10) || 0),
- top: event.pageY - offset.top +
(parseInt(closestHandle.css('marginTop'),10) || 0)
+ top: event.pageY - offset.top
+ - (closestHandle.height() / 2)
+ - (parseInt(closestHandle.css('borderTopWidth'),10) || 0)
+ - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0)
+ + (parseInt(closestHandle.css('marginTop'),10) || 0)
};
normValue = this._normValueFromMouse(position);