jieter / leaflet-headless

Leaflet for node.
118 stars 36 forks source link

zoomSnap issue? #23

Open andylarox opened 7 years ago

andylarox commented 7 years ago

Hi, I love this module and it's doing exactly what I need. However I have found a problem that I can't figure out. I can't get 'zoomSnap' to work, it seems to operate as it did on Leaflet before v1.0.0, as if zoomSnap was set to 1. So at the moment my maps are snapping to single zoom levels but I need fractional ones. As an illustration using Leaflet, running the same code, this is standard leaflet 0.7.2: http://jsfiddle.net/qjhtue1w/ and this is leaflet 1.0.3 showing the correct level of zoom: https://jsfiddle.net/1p4jggbf/ leaflet-headless seems to operate like leaflet 0.7.2, but I have checked my dependencies and I'm not using a pre-1.0.0 version of Leaflet. Any ideas?

jieter commented 7 years ago

@andylarox Thanks for reporting. Unfortunately, I currently have no time to look into this. I will be happy to merge any tested pull requests though, so if you do, please make a patch and open a PR!

andylarox commented 7 years ago

Hi, from what I can work out it's to do with Leaflet incomptibilities with Node : Leaflet defaults ZoomSnap to 1 if the browser doesn't support 3d CSS transitions.

I'm having a look at the Leaflet code.

andylarox commented 7 years ago

It would seem that Leaflet requires 3D CSS Transforms in order to perform a fractional zoom. Anyone know of a Canvas implementation for Node that performs 3D transforms?