projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
946e63b
)
fix an resize issue : when the window has resized, mouseout and mousemove handlers...
author
manufitoussi
<manu.fitoussi@gmail.com>
Wed, 30 Jan 2013 09:57:21 +0000
(10:57 +0100)
committer
manufitoussi
<manu.fitoussi@gmail.com>
Wed, 30 Jan 2013 09:57:21 +0000
(10:57 +0100)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
43d3011
..
89e3c46
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-956,19
+956,20
@@
Dygraph.prototype.createInterface_ = function() {
var dygraph = this;
var dygraph = this;
- // Don't recreate and register the handlers on subsequent calls.
- // This happens when the graph is resized.
- if (!this.mouseMoveHandler_) {
- this.mouseMoveHandler_ = function(e) {
- dygraph.mouseMove_(e);
- };
- this.addEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
+ this.mouseMoveHandler_ = function(e) {
+ dygraph.mouseMove_(e);
+ };
- this.mouseOutHandler_ = function(e) {
- dygraph.mouseOut_(e);
- };
- this.addEvent(this.mouseEventElement_, 'mouseout', this.mouseOutHandler_);
+ this.mouseOutHandler_ = function(e) {
+ dygraph.mouseOut_(e);
+ };
+
+ this.addEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
+ this.addEvent(this.mouseEventElement_, 'mouseout', this.mouseOutHandler_);
+ // Don't recreate and register the resize handler on subsequent calls.
+ // This happens when the graph is resized.
+ if (!this.resizeHandler_) {
this.resizeHandler_ = function(e) {
dygraph.resize();
};
this.resizeHandler_ = function(e) {
dygraph.resize();
};