We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I needed to restart the animation when a user clicks a button. I added this to the AnimatedMarker.js file
reStart: function(latlngs){ this.initialize(latlngs); // Don't show CSS transition back to initial position this._icon.style[L.DomUtil.TRANSITION] = ('all ' + 0 + 'ms linear') this._shadow.style[L.DomUtil.TRANSITION] = ('all ' + 0 + 'ms linear') // Reset marker to initial position this.setLatLng(this._latlngs[0]); var that = this; setTimeout(function(){ that.start(); }, 200) }
...and this to my onclick handler
animatedMarker.reStart(line.getLatLngs());
There may be a better solution, but this is working for me.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I needed to restart the animation when a user clicks a button. I added this to the AnimatedMarker.js file
...and this to my onclick handler
animatedMarker.reStart(line.getLatLngs());
There may be a better solution, but this is working for me.
The text was updated successfully, but these errors were encountered: