Original author: aromo...@gmail.com (October 22, 2010 16:30:47)
i wanted to disable the tooltips while making a selection so i tried turning off the hoverable option in the plotselecting event and then turning it back on when i get a plotselected event. unfortunately when i unselect the selection hoverable is never turned back on because i get a plotselecting event after plotunselected (which is kind of weird). wouldn't it make more sense to get a plotselecting event first and then a plot unselected? this patch fixes the issue for me:
--- jquery.flot.selection.js (revision 267)
+++ jquery.flot.selection.js (working copy)
@@ -126,8 +126,8 @@
// this counts as a clear
plot.getPlaceholder().trigger("plotselecting", [ null ]);
Original issue: http://code.google.com/p/flot/issues/detail?id=430
From dnsch...@gmail.com on July 11, 2012 01:10:07
The patch makes sense, but we need to think this through a little first. Are there any cases where one would legitimately want to receive plotunselected first? Do any of our core plugins depend on this behavior?
From vu2...@gmail.com on July 14, 2012 21:22:04
We were able to reproduce the defect here and can see how the patch makes sense. We have a question though : Why is the "plotselecting" event triggered when we unselect a region? That line of code does not seem to have a side effect (as far as we checked). Also, none of the other plugins seem to be using that event. Does it make sense to get rid of that line entirely (and hence solving the hover-toggle issue)?
From aromo...@gmail.com on July 14, 2012 21:35:57
indeed, i don't think the "plotselecting" event needs to be triggered when
we unselect the region. getting rid of the line entirely makes sense (and i
tested it with my program that it still works the way i excpect it). thanks.