Compare commits
No commits in common. "f9c98d694149a671747f74f69742c721312aeed8" and "bddb4b2088ad6da76bc9a701dbca4aae446c6f26" have entirely different histories.
f9c98d6941
...
bddb4b2088
|
@ -53,8 +53,6 @@ import router from './router/router';
|
|||
const mapStore = useMapStore();
|
||||
app.mount('#content-modale');
|
||||
|
||||
setHamburgerWhenLogged();
|
||||
|
||||
Drupal.behaviors.customLeafletInteraction = {
|
||||
attach: function(context, settings) {
|
||||
$(context).on('leafletMapInit', function (e, settings, map, mapid, markers) {
|
||||
|
@ -99,13 +97,11 @@ import router from './router/router';
|
|||
|
||||
function processStaticLinks(store, map) {
|
||||
let general_link_fields = document.querySelectorAll('#menu > ul > li > a');
|
||||
for (let i =1; i < general_link_fields.length; i ++) {
|
||||
let general_link_href = general_link_fields[i].getAttribute('href');
|
||||
for (let field of general_link_fields) {
|
||||
let general_link_href = field.getAttribute('href');
|
||||
const nid = general_link_href.charAt(general_link_href.length-1);
|
||||
if (!isNaN(nid)) {
|
||||
general_link_fields[i].setAttribute('data-node-nid', parseInt(nid));
|
||||
general_link_fields[i].addEventListener('click', (e) => onClickContentLink(e, store, map, 'static'));
|
||||
}
|
||||
field.setAttribute('data-node-nid', parseInt(nid));
|
||||
field.addEventListener('click', (e) => onClickContentLink(e, store, map, 'static'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,20 +162,6 @@ import router from './router/router';
|
|||
})
|
||||
}
|
||||
|
||||
function setHamburgerWhenLogged() {
|
||||
if (drupalSettings.user.uid != 0) {
|
||||
const menuBurger = document.querySelector('#hamburger');
|
||||
const menuTitle = document.querySelector('#menu-title');
|
||||
const menuContainer = document.querySelector('#block-caravane-mainnavigation > #menu > ul');
|
||||
const header = document.querySelector('.dialog-off-canvas-main-canvas');
|
||||
const headerTop = header.getBoundingClientRect().top;
|
||||
|
||||
menuTitle.style.top = `${headerTop}px`;
|
||||
menuBurger.style.top = `${headerTop}px`;
|
||||
menuContainer.style.paddingTop = `${headerTop}px`;
|
||||
}
|
||||
}
|
||||
|
||||
function setupEtapeMapPopup(store, map) {
|
||||
const icons = document.querySelectorAll('.leaflet-map-divicon');
|
||||
for (let icon of icons) {
|
||||
|
|
|
@ -138,8 +138,15 @@ const handleMapMovement = () => {
|
|||
watch(
|
||||
() => href.value,
|
||||
() => {
|
||||
console.log("NEW HREF");
|
||||
console.log(href.value);
|
||||
|
||||
isModaleEtape = !isObjectEmpty(etape.value);
|
||||
|
||||
console.log("CAS 1", !wasModaleEtape && isModaleEtape);
|
||||
console.log("CAS 2", wasModaleEtape && isModaleEtape);
|
||||
console.log("CAS 3", wasModaleEtape && !isModaleEtape);
|
||||
|
||||
if (!wasModaleEtape && isModaleEtape) {
|
||||
document.documentElement.style.setProperty('--modale-enter-delay', `${duration.value}s`);
|
||||
mapState.zoomToPlace(map.value, etape.value.coordinates.lat, etape.value.coordinates.lon);
|
||||
|
|
Loading…
Reference in New Issue