From: Paul Felix Date: Thu, 6 Sep 2012 13:24:58 +0000 (-0400) Subject: Handling zoom handle left position as a floating-point number for better accuracy... X-Git-Tag: v1.0.0~123 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=088be40ba438baaddbbd7135fd20c33135fcaca3;p=dygraphs.git Handling zoom handle left position as a floating-point number for better accuracy at the extremes. --- 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,