From 210acace208806b98493e5852d4ca73495e1d246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Mon, 11 Jan 2016 16:54:53 -0500 Subject: [PATCH 1/3] partial fix for click events: - call fx.unhover only on lasso and select-box starts --- src/plots/cartesian/graph_interact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plots/cartesian/graph_interact.js b/src/plots/cartesian/graph_interact.js index 063ce9fa72d..32910463985 100644 --- a/src/plots/cartesian/graph_interact.js +++ b/src/plots/cartesian/graph_interact.js @@ -1377,7 +1377,6 @@ function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { yaxes: ya, doubleclick: doubleClick, prepFn: function(e, startX, startY) { - fx.unhover(gd); // we want a clear plot for dragging var dragModeNow = gd._fullLayout.dragmode; if(ns + ew === 'nsew') { // main dragger handles all drag modes, and changes @@ -1404,6 +1403,7 @@ function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { clearSelect(); } else if(dragModeNow === 'select' || dragModeNow === 'lasso') { + fx.unhover(gd); // we want a clear plot for dragging prepSelect(e, startX, startY, dragOptions, dragModeNow); } } From 40cc58508dc97c84006a1a32cc3bc72f3e681ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Mon, 11 Jan 2016 17:07:27 -0500 Subject: [PATCH 2/3] bring fx.unhover call to onDone handler --- src/plots/cartesian/graph_interact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plots/cartesian/graph_interact.js b/src/plots/cartesian/graph_interact.js index 32910463985..443976aa506 100644 --- a/src/plots/cartesian/graph_interact.js +++ b/src/plots/cartesian/graph_interact.js @@ -1403,7 +1403,6 @@ function dragBox(gd, plotinfo, x, y, w, h, ns, ew) { clearSelect(); } else if(dragModeNow === 'select' || dragModeNow === 'lasso') { - fx.unhover(gd); // we want a clear plot for dragging prepSelect(e, startX, startY, dragOptions, dragModeNow); } } @@ -2060,6 +2059,7 @@ fx.dragElement = function(options) { if(!gd._dragging) { gd._dragged = false; + fx.unhover(gd); return; } gd._dragging = false; From 026e16e3dba3a5829ac54c76daf0f955a45ae79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20T=C3=A9treault-Pinard?= Date: Mon, 11 Jan 2016 17:11:12 -0500 Subject: [PATCH 3/3] move fx.unhover call to onMove handler --- src/plots/cartesian/graph_interact.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plots/cartesian/graph_interact.js b/src/plots/cartesian/graph_interact.js index 443976aa506..d1f6145e639 100644 --- a/src/plots/cartesian/graph_interact.js +++ b/src/plots/cartesian/graph_interact.js @@ -2044,7 +2044,10 @@ fx.dragElement = function(options) { if(Math.abs(dx) < minDrag) dx = 0; if(Math.abs(dy) < minDrag) dy = 0; - if(dx||dy) gd._dragged = true; + if(dx||dy) { + gd._dragged = true; + fx.unhover(gd); + } if(options.moveFn) options.moveFn(dx, dy, gd._dragged); @@ -2059,7 +2062,6 @@ fx.dragElement = function(options) { if(!gd._dragging) { gd._dragged = false; - fx.unhover(gd); return; } gd._dragging = false;