From 088be40ba438baaddbbd7135fd20c33135fcaca3 Mon Sep 17 00:00:00 2001 From: Paul Felix Date: Thu, 6 Sep 2012 09:24:58 -0400 Subject: [PATCH] Handling zoom handle left position as a floating-point number for better accuracy at the extremes. --- plugins/range-selector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/range-selector.js b/plugins/range-selector.js index b467377..e8c3efb 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -846,8 +846,8 @@ rangeSelector.prototype.drawInteractiveLayer_ = function() { */ rangeSelector.prototype.getZoomHandleStatus_ = function() { var halfHandleWidth = this.leftZoomHandle_.width/2; - var leftHandlePos = parseInt(this.leftZoomHandle_.style.left, 10) + halfHandleWidth; - var rightHandlePos = parseInt(this.rightZoomHandle_.style.left, 10) + halfHandleWidth; + var leftHandlePos = parseFloat(this.leftZoomHandle_.style.left) + halfHandleWidth; + var rightHandlePos = parseFloat(this.rightZoomHandle_.style.left) + halfHandleWidth; return { leftHandlePos: leftHandlePos, rightHandlePos: rightHandlePos, -- 2.7.4