Skip to content
  • Sponsor plotly/plotly.js

  • Notifications You must be signed in to change notification settings
  • Fork 1.9k

Commit 0afa52c

Browse files
committedJul 14, 2022
avoid emitting select events using shape drawing dragmodes
1 parent 0b00ed9 commit 0afa52c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/components/selections/select.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,10 +1503,13 @@ function getFillRangeItems(dragOptions) {
15031503
}
15041504

15051505
function emitSelecting(gd, eventData) {
1506+
if(drawMode(gd._fullLayout.dragmode)) return;
15061507
gd.emit('plotly_selecting', eventData);
15071508
}
15081509

15091510
function emitSelected(gd, eventData) {
1511+
if(drawMode(gd._fullLayout.dragmode)) return;
1512+
15101513
if(eventData) {
15111514
eventData.selections = (gd.layout || {}).selections || [];
15121515
}
@@ -1515,6 +1518,7 @@ function emitSelected(gd, eventData) {
15151518
}
15161519

15171520
function emitDeselect(gd) {
1521+
if(drawMode(gd._fullLayout.dragmode)) return;
15181522
gd.emit('plotly_deselect', null);
15191523
}
15201524

0 commit comments

Comments
 (0)