Permalink
Browse files

Fix problem with locking and sensitivity to mouse events (fix by

fdepuydt, issue 332)


git-svn-id: http://flot.googlecode.com/svn/trunk@255 1e0a6537-2640-0410-bfb7-f154510ff394
  • Loading branch information...
1 parent fb0593f commit d95483ff7a0a34648083a561eedef1fff1c682af olau@iola.dk committed Apr 15, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 jquery.flot.crosshair.js
View
@@ -105,14 +105,14 @@ The plugin also adds four public methods:
});
eventHolder.mousemove(function (e) {
+ if (crosshair.locked)
+ return;
+
if (plot.getSelection && plot.getSelection()) {
crosshair.x = -1; // hide the crosshair while selecting
return;
}
- if (crosshair.locked)
- return;
-
var offset = plot.offset();
crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));

0 comments on commit d95483f

Please sign in to comment.