Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Loss of css transform property caused by leaflet marker code. #1370
So I'm creating a map program that combines your API along with jQueryRotate to select and rotate an image of something on the map. Originally, I was having problems with jQueryRotate because every time it applied a css transform, it was doing simple assignment instead of increment, so:
So it lost the original transform, and since leaflet applies a translate, it would immediately rotate the image and move it to the top left corner of the div element.
Now this was an easy fix, I told the author of jQueryRotate he needed to change his code from:
Now it appears your code is doing the exact same thing. I am applying the rotate transform in addition to the already applied translate from leaflet, and that works great, until I zoom in, and leaflet reloads the marker icon image, ASSIGNS the translate property, and the rotate is gone. So because of that, the image flips back to the original for a split second until the timer call comes thru again and re-rotates it.
It seems so many people have the tendency to code with the mindset that there might not be anything preexisting.
It would be very nice if this could be changed, thanks.
Okay now I have the div moving and jQueryRotate moving the image inside the div. I can make the div transparent through jQuery, but I feel like there should be an option for that somehow without needing jQuery. Besides that, I think the colliding transforms issue should be fixed anyways in case someone wants to use an image directly.