ewoken / Leaflet.MovingMarker

A Leaflet plug-in to create moving marker
MIT License
342 stars 177 forks source link

Using negative durations #29

Open tiagomoucho3 opened 6 years ago

tiagomoucho3 commented 6 years ago

Is there a way to catch a negative duration? I want to use negative durations so the marker would jump to a location but I need to differentiate what the marker does. For example, if it catches a -1, the marker would jump to the location but gets hidden for an amount of time. If the value is -2, the marker jumps to a location but changes the marker's border. I've tried listening for the durations array at the _loadLine and _updateLine functions but whenever there is a small number, negative or not, it just jumps to the next index of the durations array. Can someone help me? Thanks in advance!