Refactored tag list in their own component

This commit is contained in:
Alexis
2024-01-10 21:03:37 +01:00
parent 68eb0d165f
commit d680cae84d
7 changed files with 236 additions and 141 deletions

View File

@@ -44,6 +44,8 @@ const inertiaDeceleration = 2000
const maxBoundsPadding = 10
const maxBoundsViscosity = .75
const mapEl = document.getElementById('world')
// Initializes the map
const map = L.map('world', {
crs: L.CRS.Simple,
@@ -296,6 +298,10 @@ let customMarkersList = []
function saveCustomMarkers() {
localStorage.setItem('custom-markers', JSON.stringify(customMarkersList))
const refreshCustomMarkersEvent = new CustomEvent('refresh-custom-markers', { bubbles: true })
mapEl.dispatchEvent(refreshCustomMarkersEvent)
}
// Stores last map coords on context