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 touch event support for lasso/select drag modes #1790

Closed
etpinard opened this issue Jun 15, 2017 · 7 comments
Closed

Add touch event support for lasso/select drag modes #1790

etpinard opened this issue Jun 15, 2017 · 7 comments
Labels
feature something new

Comments

@etpinard
Copy link
Contributor

related to #480 and #1098 but of higher priority.

There a few complications that I can think of:

  • Right now, touch on mobile is sorta like a mousemove on desktop: it activates hover. So how would we distinguish between hover, click and select? Maybe under layout.dragmode: 'lasso' // or 'select' hover labels & hover/click event would be turned off on mobile and leaving only selections on touch.

It might be nice to review what other interactive graphing libraries out there are doing before going at it.

@dfcreative would you be interested in looking at this?

cc @jackparmer

@etpinard etpinard added the feature something new label Jun 15, 2017
@dy
Copy link
Contributor

dy commented Jun 15, 2017

@etpinard sure, I will have a look, sounds fun

@dy
Copy link
Contributor

dy commented Jun 16, 2017

@etpinard currently we don't have a toolbar on mobiles, because it shows on hover. Probably we should test if it is mobile to show toolbar always, right? Like set displayModeBar: true.
image

@dy
Copy link
Contributor

dy commented Jun 16, 2017

WIP https://github.com/dfcreative/plotly.js/tree/select-touch

@dy
Copy link
Contributor

dy commented Jun 16, 2017

@etpinard we have a problem here. Turns out touch interactions cannot touchstart on one element and then continue touchmove on another element, they require to be consistent in terms of source. But we create dragcover element here once we capture mouse down.

Possible solutions

  • create dragcover in select/lasso mode for mobiles once the mode is active
  • ignore dragcover and bind touch interactions directly to document
  • get rid of dragcover and use touch-pinch module both for mouse/touches

@etpinard
Copy link
Contributor Author

create dragcover in select/lasso mode for mobile

Creating a mobile-specific dragcover sounds like the way to go.

@dy
Copy link
Contributor

dy commented Jun 22, 2017

@etpinard should be fixed in #1804

@jackparmer
Copy link
Contributor

Another win for crossfilter 🎉 #1316

@dy dy closed this as completed in #1804 Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

3 participants