Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c19406

Browse files
committed
try sending hoverdata on double click:
- double click on a data pt now (1) fires a click event, (2) fires a double click event and (3) fires another click event, with the same event data - double clicking not on a data pt fires a double click event with null event data
1 parent c41a756 commit 9c19406

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plots/cartesian/graph_interact.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,8 @@ function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
18211821
}
18221822
}
18231823

1824-
gd.emit('plotly_doubleclick', null);
1824+
var dblClickData = gd._hoverdata ? {points: gd._hoverdata} : null;
1825+
gd.emit('plotly_doubleclick', dblClickData);
18251826
Plotly.relayout(gd, attrs);
18261827
}
18271828

0 commit comments

Comments
 (0)