Skip to content

Commit ec4253a

Browse files
committed
slider bugfix
1 parent 8d030a2 commit ec4253a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

fantasysixtysix/slider.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ L.Control.Slider = L.Control.extend({
1919
input.value = this.options.max;
2020

2121
const locations = this.options.locations;
22+
const updates = this.options.updates;
2223

2324
this.markers = this.options.markers;
2425
this.path = this.options.path;
2526

2627
input.addEventListener("input", () => {
2728
this.markers.map(marker => map.removeLayer(marker));
2829
map.removeLayer(this.path)
29-
const [markers, path] = buildPath(locations.slice(0, input.value))
30+
const [markers, path] = buildPath(locations.slice(0, input.value), updates)
3031
this.markers = markers;
3132
this.path = path;
3233
markers.map(marker => marker.addTo(map));

fantasysixtysix/trip.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ L.control
2626
min: 0,
2727
max: locations.length,
2828
locations,
29+
updates,
2930
markers,
3031
path,
3132
map,

0 commit comments

Comments
 (0)