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

Pinch Zoom to improve #132

Open
YannNeobards opened this issue Jun 7, 2022 · 1 comment
Open

Pinch Zoom to improve #132

YannNeobards opened this issue Jun 7, 2022 · 1 comment

Comments

@YannNeobards
Copy link

Hello,

can you improve Pinch zoom events on mobile ?
when you use 2 fingers to zoom on mobile (chrome) the scaling is not done until release
would be great if improved

thanks

@YannNeobards
Copy link
Author

I have fix it quikely (not sure good way) by adding event listener on onAdd(

onAdd(t) {
...
this.isAnimated() && t.on("zoom", this._reset, this),
this.isAnimated() && t.on("move", this._reset, this),

and

onRemove(t)
...
this.isAnimated() && t.off("zoom", this._reset, this),
this.isAnimated() && t.off("move", this._reset, this),

add 'move' event works fine for me to make it works properly with a requestAnimationFrame( changing color and use .render()

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

No branches or pull requests

1 participant