Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

Transition for smoothing player markers movement overrides the transition for zooming

reviiii opened this issue ยท 4 comments

commented

The styles for smoothing player movements overrule the styles for zoom animations, causing the player markers to move erratically.

relevant css:

.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}

/* smooth player movements (contrib from KillahKiwi) */
.dynmap .playerMarker {
-moz-transition: all 0.6s ease-in-out 0s;
-webkit-transition: all 0.6s ease-in-out 0s;
-o-transition: all 0.6s ease-in-out 0s;
transition: all 0.6s ease-in-out 0s;
}

This can be solved by changing the source order or adding !important to the zoom animations

commented

Hey! Sorry to necro this post. @JLyne updated the leaflet code in #3467 and I believe this was fixed. I'll go ahead and close this this under that assumption but will reopen it if I am wrong

commented

correct me if I'm wrong but isn't the !important tag frowned upon?

commented

(The player markers only move erratically during the zoom animation)

commented

The !important tag is indeed frowned upon, but changing the source order would mean that there would be code from dynmap.css in leaflet.css or vice versa.
Another option would be to add a more specific css rule for the zoom animation for players.