robertleeplummerjr / Leaflet.glify

fully functional, ridiculously fast web gl renderer plugin for leaflet
https://robertleeplummerjr.github.io/Leaflet.glify
MIT License
480 stars 85 forks source link

Pinch Zoom to improve #132

Open YannNeobards opened 2 years ago

YannNeobards commented 2 years ago

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 commented 2 years ago

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()