Transform-origin on .leaflet-zoom-animated breaks TransformMarker
#3.800 aberto em 3 de set. de 2015
Métricas do repositório
- Stars
- (45.018 stars)
- Métricas de merge de PR
- (Mesclagem média 43m) (1 fundiu PR em 30d)
Description
Since Leaflet doesn't support rotation of markers (yet), I am using @jacobtoye's transformmarker. This worked fine in 0.7.3, but broke in 1.0.0 beta 1: markers aren't being rotated around their center point* anymore.
After a bit of digging, I found that 1.0.0 sets a transform-origin property of 0 0 on the leaflet-zoom-animated class. This causes markers to be rotated around their top-left corner rather than the correct point.
The fix for this is simple. However, since the transform marker is not an official Leaflet product, I am not sure whether this should be "fixed" in Leaflet itself, or in transformmarker, on on a per-project basis. Can a Leaflet-core contributor please advise?
* center point in my case, but in reality this will depend on the marker's iconAnchor point.