X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=c07fe359407a9d85a57a92551541049fe7e5b6a4;hb=f3cd243e082d307cabdc1831676cc3f941dc6a20;hp=c60ecccef2acd337d8c202c8f171ce2e2db33daf;hpb=421f177336b1dbd195952cfee457483ec9f479ba;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index c60eccc..c07fe35 100644 --- a/dygraph.js +++ b/dygraph.js @@ -888,6 +888,7 @@ Dygraph.prototype.destroy = function() { // remove mouse event handlers Dygraph.removeEvent(this.mouseEventElement_, 'mouseout', this.mouseOutHandler); Dygraph.removeEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler); + Dygraph.removeEvent(this.mouseEventElement_, 'mousemove', this.mouseUpHandler_); removeRecursive(this.maindiv_); var nullOut = function(obj) { @@ -1014,6 +1015,7 @@ Dygraph.prototype.createStatusMessage_ = function() { "top": "0px", "left": (this.width_ - divWidth - 2) + "px", "background": "white", + "lineHeight": "normal", "textAlign": "left", "overflow": "hidden"}; Dygraph.update(messagestyle, this.attr_('labelsDivStyles')); @@ -1181,7 +1183,7 @@ Dygraph.prototype.createDragInterface_ = function() { // If the user releases the mouse button during a drag, but not over the // canvas, then it doesn't count as a zooming action. - Dygraph.addEvent(document, 'mouseup', function(event) { + this.mouseUpHandler_ = function(event) { if (context.isZooming || context.isPanning) { context.isZooming = false; context.dragStartX = null; @@ -1197,7 +1199,9 @@ Dygraph.prototype.createDragInterface_ = function() { delete self.axes_[i].dragValueRange; } } - }); + }; + + Dygraph.addEvent(document, 'mouseup', this.mouseUpHandler_); }; /**