Refactor bview to Stimulus (mostly)

This commit is contained in:
2026-09-20 12:57:05 +02:00
parent cc590afa54
commit 5942cf37b4
6 changed files with 93 additions and 27 deletions
-14
View File
@@ -59,20 +59,6 @@ UI.addCenterMapControl = function (map, centerCoords, zoom) {
let centerCtr = new L.Control.CenterControl();
map.addControl(centerCtr);
}
UI.addBuildingViewBar = function() {
const bar = document.createElement('div');
bar.className = 'container bview-bar has-background-primary-90 p-3';
bar.setAttribute('data-bview-target', 'bar');
bar.innerHTML = html`
<button title="Esci da mappa USM" class="delete is-pulled-right" data-action="bview#closeView"></button>
<p class="has-text-centered has-text-weight-semibold is-size-5 p-2">Mappa Unità Stratigrafica Muraria (USM)</p>
<p class="has-text-centered is-size-6 mt-0 pt-0">(Chiudere questo riquadro o premere ESC per uscire)</p>
`;
document.body.appendChild(bar);
}
/**
* Toggle burger menu for small screens
* @param {string} burgerClass The CSS class of the burger element