L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
119 stars 22 forks source link

Leaflet Slider Sort order #72

Closed PirateIncognito closed 4 years ago

PirateIncognito commented 4 years ago

I ran a batch of 50 save games.

The base slider is out of order. https://i.imgur.com/aQGqOkN.png

I confirmed it's not a graphical issue (overlayed text).

The actual ordering is incorrect if you drag the slider.

I'm wondering how this can be manually fixed, but I can't find the code that generates the slider.

I've uploaded a copy of the map (minus images) here. https://drive.google.com/open?id=1Jyt0tjbocFlA6_iU_sFhFtFDKaGW41-3

This may be un-related but the script hung after cropping the last save file. I re-ran with --dry and it created index.html

PirateIncognito commented 4 years ago

Update Seems to have resolved itself by tweaking index.js to give the slider a bit more room

https://i.imgur.com/h4SwlGm.png

Before

https://github.com/L0laapk3/FactorioMaps/blob/36cb312393d16a55aa1f9294a4b11c1979790fe9/web/index.js#L541

https://github.com/L0laapk3/FactorioMaps/blob/36cb312393d16a55aa1f9294a4b11c1979790fe9/web/index.js#L574

After

L541: let sliderHeight = Math.min(window.innerWidth * .9, Math.max(95, 45 * (layersByTimestamp.length - 1))); L574: orientation: "horizontal",