X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=c94536b59b64895e05f48d69fa06b3ce5c348846;hb=1069800f8f3a766949a64d0cee2e3f34b0f8e2c0;hp=bc830b2b9b81793c18fd430dd411d964cd46fa4a;hpb=470d42e152bd816333bb9879731c77340daaf7c1;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index bc830b2..c94536b 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1552,7 +1552,8 @@ Dygraph.prototype.findClosestPoint = function(domX, domY) { dy = point.canvasy - domY; dist = dx * dx + dy * dy; if (minDist === null || dist < minDist) { - minDist = dist; + if (!isNaN(dist)) + minDist = dist; closestPoint = point; closestSeries = setIdx; idx = i;