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

Pointer events cleanup and alignment #195

Closed
wants to merge 8 commits into from
Closed

Conversation

davidaurelio
Copy link
Contributor

  • Cleans up event handling in the svg renderer.
  • adds “deltaX/Y” and “diffX/Y” to regular “pointermove” events as well (not only drags) when triggered by mouse events.
  • adds “deltaX/Y” to “pointermove” and “drag” events when triggered by touches
  • does not send unnecessary drag events to the runner.
  • Stops memory leaking from touch events.

@basecode
Copy link
Contributor

Thanks, looks good. What about tests?

@iamdustan
Copy link
Contributor

I can’t tell by glancing through this, but does it or would it make sense to include the diffX/diffY from the start coordinate for drag events rather than (or in addition to) the last event emission?

That way things like https://github.com/uxebu/bonsai-demos/blob/gh-pages/demos/draggable-shapes/index.html#L49 can be handled by bonsai and userland doesn’t need to keep track of that state?

@davidaurelio
Copy link
Contributor Author

Yes, absolutely. I’m already working on it in the next branch.

  • diffX/Y will be offsets from the start of the drag
  • deltaX/Y will be offsets relative to the last event (also fired for mousemove)

@iamdustan
Copy link
Contributor

Awesome. 👍

@davidaurelio
Copy link
Contributor Author

Closed in favor of #201

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.

None yet

3 participants