WIP: load all wall techs for a given site

TODO: refactor!!
This commit is contained in:
2026-09-16 17:17:48 +02:00
parent ebc33fe53e
commit cc590afa54
8 changed files with 84 additions and 38 deletions
+3 -4
View File
@@ -6,7 +6,7 @@ export default class extends Controller {
closeView(event) {
// Don't do anything if ESC keyboard event
// is not fired from the building view
// is not fired from the building view
if (event instanceof KeyboardEvent && !GisState.bViewActive) return;
this.resetMap();
@@ -17,8 +17,8 @@ export default class extends Controller {
resetMap() {
// Restore previous map state before closing view
const map = GisState.map;
// Hard-coded...
map.removeLayer(GisState.baseLayers['Limiti amministrativi']);
//map.removeLayer(GisState.cartography.buildings);
const walls = GisState.layers.walls;
@@ -26,7 +26,6 @@ export default class extends Controller {
// it doesn't remove the layer group (fails silently)
walls.eachLayer(layer => map.removeLayer(layer));
GisState.layers.walls.removeFrom(map);
map.addLayer(GisState.currentMapState.baseLayer);
map.setMinZoom(GisState.currentMapState.minZoom);
map.setMaxZoom(GisState.currentMapState.maxZoom);
@@ -34,6 +33,6 @@ export default class extends Controller {
GisState.currentMapState.center,
GisState.currentMapState.zoom
);
map._container.classList.remove('bview-border');
map._container.classList.remove('bview-active');
}
}