X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Frange-selector.js;h=797140cd0fa0810076f7def64672fe33b2f79785;hb=de9a8181064aa767e1c70c31a0027a0324cc33c6;hp=b46737797d5a23e68e28f2e127ac2ae9a2676c5d;hpb=ec475f445b083d0ea77dbaf43ae709ad5cff35b8;p=dygraphs.git diff --git a/plugins/range-selector.js b/plugins/range-selector.js index b467377..797140c 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -3,6 +3,7 @@ * Copyright 2011 Paul Felix (paul.eric.felix@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) */ +/*global Dygraph:false,TouchEvent:false */ /** * @fileoverview This file contains the RangeSelector plugin used to provide @@ -166,7 +167,7 @@ rangeSelector.prototype.updateInterfaceStatus_ = function() { setTimeout(function() { dygraph.width_ = 0; dygraph.resize(); }, 1); } return enabled; -} +}; /** * @private @@ -846,8 +847,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,