projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fd9bbb
)
Resize event causes several mouseUp handler to be be added. Prevent multiple registra...
author
manufitoussi
<manu.fitoussi@gmail.com>
Wed, 30 Jan 2013 09:58:45 +0000
(10:58 +0100)
committer
manufitoussi
<manu.fitoussi@gmail.com>
Wed, 30 Jan 2013 09:58:45 +0000
(10:58 +0100)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
89e3c46
..
2580556
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-1278,6
+1278,12
@@
Dygraph.prototype.createDragInterface_ = function() {
bindHandler(interactionModel[eventName]));
}
+ // unregister the handler on subsequent calls.
+ // This happens when the graph is resized.
+ if (this.mouseUpHandler_) {
+ Dygraph.removeEvent(document, 'mouseup', this.mouseUpHandler_);
+ };
+
// If the user releases the mouse button during a drag, but not over the
// canvas, then it doesn't count as a zooming action.
this.mouseUpHandler_ = function(event) {