projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
506f9b1
)
highlight callback only when selected point changes
author
Dan Vanderkam
<danvdk@gmail.com>
Fri, 5 Feb 2010 05:36:21 +0000
(21:36 -0800)
committer
Dan Vanderkam
<danvdk@gmail.com>
Fri, 5 Feb 2010 05:36:21 +0000
(21:36 -0800)
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
8a303a0
..
d9c0e27
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-782,7
+782,11
@@
Dygraph.prototype.mouseMove_ = function(event) {
}
if (this.attr_("highlightCallback")) {
- this.attr_("highlightCallback")(event, lastx, this.selPoints_);
+ var px = this.lastHighlightCallbackX;
+ if (px !== null && lastx != px) {
+ this.attr_("highlightCallback")(event, lastx, this.selPoints_);
+ this.lastHighlightCallbackX = lastx;
+ }
}
// Clear the previously drawn vertical, if there is one