projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26ee261
)
Patch for issue 242 from kberg
author
Dan Vanderkam
<dan@dygraphs.com>
Thu, 17 Nov 2011 22:23:48 +0000
(17:23 -0500)
committer
Dan Vanderkam
<dan@dygraphs.com>
Thu, 17 Nov 2011 22:23:48 +0000
(17:23 -0500)
dygraph-interaction-model.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph-interaction-model.js
b/dygraph-interaction-model.js
index
06655f1
..
98d1411
100644
(file)
--- a/
dygraph-interaction-model.js
+++ b/
dygraph-interaction-model.js
@@
-266,7
+266,8
@@
Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
var p = g.selPoints_[i];
var distance = Math.pow(p.canvasx - context.dragEndX, 2) +
Math.pow(p.canvasy - context.dragEndY, 2);
- if (closestIdx == -1 || distance < closestDistance) {
+ if (!isNaN(distance) &&
+ (closestIdx == -1 || distance < closestDistance)) {
closestDistance = distance;
closestIdx = i;
}