Permalink
Browse files

Now that we have that convenient cleanup() function we can call it on…

… the graph's mouseout event so that we don't leave hints and highlighted points around when the user mouses outside of the graph onto the rest of the page. This can be especially annoying and common when there are points near the top and right side of the graph... And now it's fixed.
  • Loading branch information...
1 parent b61d0af commit 6e4b4afd1237d4aadc8250d0eee6a95a0967e8ab @rfunduk committed Jul 28, 2008
Showing with 3 additions and 1 deletion.
  1. +3 −1 jquery.flot.js
View
4 jquery.flot.js
@@ -147,7 +147,9 @@ BOTTOM_SIDE_BUFFER = 5;
constructCanvas();
setupGrid();
draw();
-
+ // kill hints and highlighted points when the mouse leaves the graph
+ if (options.grid.hoverable) { $(target).mouseout(cleanup); }
+
function setData(d) {
series = parseData(d);

0 comments on commit 6e4b4af

Please sign in to comment.