Istador / pine-interactive-map

Interactive Map for the video game Pine. Showing all collectibles, resources and more that can be found in the game.
https://pine.blackpinguin.de/
Mozilla Public License 2.0
22 stars 5 forks source link

Map only half usable and not centered #3

Closed Istador closed 5 years ago

Istador commented 5 years ago

By thymaro#5985 on 2019-07-23 at 09:31 in Discord:

when I open the page in FF, the map is at the top of the page and I see a lot of water. The map is only half visible instead of centered in the browser window.

I also noticed this a few times during development (Chrome and Firefox). The map is bugged and limited to an decreased area of the viewport at the top.

It isn't a constant behavior for me, but it only happens rarely. It is usually fixed by reloading the page or by resizing the window. I couldn't reproduce it reliably yet to investigate further.

I think I might initialize the map to early, call fitBounds too early, or defer isn't working correctly and I need to move the <script>s to the end of the <body> or even manually wait for DOMContentLoaded.