-
Notifications
You must be signed in to change notification settings - Fork 497
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 touchscreen drag/zoom support #93
Conversation
5944ee8
to
bc73cdb
Compare
Hopefully this commit can be reverted at some point in the future
bc73cdb
to
1cf013e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for adding touch support. Some comments below.
Hey @JJJollyjim please let me know if you will be able to address the review comments soon. I plan on releasing v2.1 soon and would like to get this in but it's ok if you don't have time right now. In that case it will go in v2.2 or whenever it is ready. |
Oh yes I'm busy tonight but will respond tomorrow, thanks for reminding me :) |
I accidentally clicked resolve on the thread about where to center the zooming and can't get it back, but I made a quick video to demo my approach since you mentioned you can't test it: https://youtu.be/g2JyAtq1eE8 In short, zooming on the other finger matches the bahaviour of the OS and doesn't seem to show any shakiness |
I'll push my changes for the style/minifciations comments when I'm back at my computer |
I think this is in good shape now and I could merge now, take care of touch reset later. Unless you already have some work done? |
Just finished and pushed it :) |
bea28a1
to
63847dd
Compare
Thanks for the contribution and patience with code review! |
This merge request adds support for full interaction with the canvas through dragging and pinch-to-zoom on mobile devices. It uses the Pointer Events API (a unified touch+mouse API), which is not supported in current Safari without a polyfill (though is in the preview version).
To summarise, without a polyfill:
And with a polyfill:
On the assumption that dropping safari mouse support is an issue, the second commit adds a pointer event polyfill.
I have tested this change (including the polyfill) on: