modale responsive
This commit is contained in:
@@ -14,5 +14,23 @@ export const useLayoutStore = defineStore('layout', {
|
||||
})
|
||||
this.isEtapeListRetracted = this.isDesktop ? false : true;
|
||||
},
|
||||
collapseEtapeListe(listeEtape) {
|
||||
listeEtape.classList.add('retracted');
|
||||
setTimeout(() => {
|
||||
listeEtape.closest('.layout__region').classList.add('retracted');
|
||||
listeEtape.nextElementSibling.classList.add('retracted');
|
||||
listeEtape.classList.add('disapeared');
|
||||
}, 300);
|
||||
this.isEtapeListRetracted = true;
|
||||
},
|
||||
expandEtapeListe(listeEtape) {
|
||||
listeEtape.closest('.layout__region').classList.remove('retracted');
|
||||
listeEtape.nextElementSibling.classList.remove('retracted');
|
||||
listeEtape.classList.remove('disapeared');
|
||||
setTimeout(() => {
|
||||
listeEtape.classList.remove('retracted');
|
||||
}, 300);
|
||||
this.isEtapeListRetracted = false;
|
||||
},
|
||||
},
|
||||
})
|
@@ -1,4 +1,5 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { useLayoutStore } from './layout';
|
||||
|
||||
export const useMapStore = defineStore('mapState', {
|
||||
state: () => ({
|
||||
@@ -12,6 +13,7 @@ export const useMapStore = defineStore('mapState', {
|
||||
}),
|
||||
actions: {
|
||||
zoomToPlace(lat, long) {
|
||||
if (useLayoutStore().isDesktop) long = long - 0.03;
|
||||
this.map.flyTo([lat, long], this.maxZoom, { duration: this.duration });
|
||||
this.currentZoom = this.maxZoom;
|
||||
},
|
||||
|
Reference in New Issue
Block a user