Skip to content

Commit 10cded2

Browse files
committedFeb 15, 2016
emit 'plotly_doubleclick' events,
on dragbox double clicks and select/lasso double clicks
1 parent bd6995e commit 10cded2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎src/plots/cartesian/graph_interact.js

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

1824-
gd.emit('plotly_doubleclick', {});
1824+
gd.emit('plotly_doubleclick', null);
18251825
Plotly.relayout(gd, attrs);
18261826
}
18271827

‎src/plots/cartesian/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
172172
searchInfo.selectPoints(searchInfo, false);
173173
}
174174

175-
gd.emit('plotly_doubleclick', {});
175+
gd.emit('plotly_doubleclick', null);
176176
}
177177
else {
178178
dragOptions.gd.emit('plotly_selected', eventData);

3 commit comments

Comments
 (3)

etpinard commented on Feb 15, 2016

@etpinard
ContributorAuthor

@mdtusz @alexcjohnson I'm debating whether we should two distinct events here.

Perhaps we could have:

  • one plotly_doubleclick fired from the draglayer while reset the axis ranges and
  • one plotly_unselect fires the selection drag box while clearing the selection

Thoughts?

etpinard commented on Feb 15, 2016

@etpinard
ContributorAuthor

Moreover, the event data is set to null at the moment as per @cpsievert 's request.

Maybe we could give more info to the users? I'm open to suggestions.

cpsievert commented on Feb 20, 2016

@cpsievert
  • one plotly_doubleclick fired from the draglayer while reset the axis ranges and
  • one plotly_unselect fires the selection drag box while clearing the selection

👍

Please sign in to comment.