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

Feat/right click #92

Merged
merged 16 commits into from
Oct 23, 2019
Merged

Conversation

tibotiber
Copy link
Contributor

Hi @williamngan,

These suggested changes pass the MouseEvent through UIs so we can differentiate between left and right clicks (among others I guess). I left the evt at the end and tested that it is backward compatible. The new API signature is:

UI.track(uis, type, pt, evt)
ui.onClick((ui, pt, type, evt) => {...})

As you can see onClick now provides the MouseEvent as well which means we can test a bunch of stuff, e.g. differentiate left and right clicks.

Taking any feedback you may have.

@williamngan
Copy link
Owner

Thanks @tibotiber - this is a good feature to have.

Can you remove all the build files and only keep the ones in "src"? It will be easier for me to review. I'll rebuild everything manually before publishing to npm.

This reverts commit f12a315.
This reverts commit 8edce52.
This reverts commit 564f286.
This reverts commit ead3a3b.
This reverts commit 2f90b45.
@tibotiber
Copy link
Contributor Author

@williamngan, I've reverted the commits. You better squash this when you merge, or if you prefer that I rebase, let me know. I'm leaving the dist there if you don't mind because my app is currently using this branch as dependency.

@williamngan
Copy link
Owner

Great to have this event passed into callback from advanced functionality. Thanks @tibotiber

@williamngan williamngan merged commit efae9e7 into williamngan:master Oct 23, 2019
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.

2 participants