Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doubleclick events #255

Merged
merged 15 commits into from
Feb 24, 2016
Merged

Add doubleclick events #255

merged 15 commits into from
Feb 24, 2016

Conversation

etpinard
Copy link
Contributor

As requested by @cpsievert in plotly/plotly.R#416 .

This PR also introduces jasmine tests for select and lasso event data.

Part of #145

var Plots = Plotly.Plots;

beforeEach(function() {
this.modulesKeys = Object.keys(Plots.modules);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid using this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

You're not a fan of the jasmine this ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually on second look, I'm ok with that. Didn't know that it was jasmine convention and that the this is cleared between specs.

- 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
- to not introduce more complexity into our
  set of event data
@mdtusz
Copy link
Contributor

mdtusz commented Feb 24, 2016

Looks good. Nice tests too. Seems like closeToArray will get lots of use in the future 🍻

💃

@@ -171,6 +171,8 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
searchInfo = searchTraces[i];
searchInfo.selectPoints(searchInfo, false);
}

gd.emit('plotly_deselect', null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etpinard added a commit that referenced this pull request Feb 24, 2016
@etpinard etpinard merged commit 5d35fd6 into master Feb 24, 2016
@etpinard etpinard deleted the emit-doubleclick branch February 24, 2016 19:09
@cpsievert
Copy link

💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants