extensive changes

This commit is contained in:
2026-03-27 17:11:13 -04:00
parent 3f3a5136eb
commit 05e63a28f1
14 changed files with 1431 additions and 508 deletions

View File

@@ -1,19 +1,36 @@
import { defineStore, acceptHMRUpdate } from 'pinia';
import { favorites } from 'constants/favorites'
interface State {
zoom: number
center: [number, number]
markerLatLng: [number, number]
center: [number, number] | [null, null] | null
markerLatLng: [number, number] | [null, null] | null
qLocDrawer: boolean
}
export const useLeafletStore = defineStore('leaflet', {
state: (): State => {
return {
zoom: 10,
center: [40.71278, -74.00594],
markerLatLng: [40.71278, -74.00594],
center: [favorites.home.coords.lat, favorites.home.coords.lng],
markerLatLng: null,
qLocDrawer: false,
}
},
actions: {
setCenter(lat: number, lng: number) {
this.center = [lat, lng];
},
setZoom(zoom: number) {
this.zoom = zoom;
},
setMarkerLatLng(lat: number, lng: number) {
this.markerLatLng = [lat, lng];
},
toggleQLocDrawer() {
this.qLocDrawer = !this.qLocDrawer
}
}
})
if (import.meta.hot) {