From 1afa4491fbe00bbe69dd99309831d1683e969d52 Mon Sep 17 00:00:00 2001 From: Egon Steiner Date: Mon, 4 Jul 2016 15:02:42 +0200 Subject: [PATCH] don't pause before starting animation --- src/AnimatedMarker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AnimatedMarker.js b/src/AnimatedMarker.js index 9bc5d1f..0874ab6 100644 --- a/src/AnimatedMarker.js +++ b/src/AnimatedMarker.js @@ -55,7 +55,7 @@ L.AnimatedMarker = L.Marker.extend({ } }, - animate: function() { + animate: function(start) { var self = this, len = this._latlngs.length, speed = this.options.interval; @@ -82,12 +82,12 @@ L.AnimatedMarker = L.Marker.extend({ } else { self.animate(); } - }, speed); + }, start ? 0 : speed); }, // Start the animation start: function() { - this.animate(); + this.animate(true); }, // Stop the animation in place