Some minor cleaning
This commit is contained in:
parent
a783e6d889
commit
d36cdd4d17
@ -63,7 +63,6 @@
|
||||
<div class="modal">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-content has-background-white">
|
||||
<!-- Any other Bulma elements you want -->
|
||||
</div>
|
||||
<button class="modal-close is-large" aria-label="close"></button>
|
||||
</div>
|
||||
|
12
js/index.js
12
js/index.js
@ -1,4 +1,4 @@
|
||||
import GIS from './caprigis.js';
|
||||
import GIS from './gis.js';
|
||||
import UI from './ui.js';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
@ -8,14 +8,4 @@ document.addEventListener('DOMContentLoaded', async () => {
|
||||
UI.addCenterMapControl(map, GIS.CENTER_COORDS, GIS.INIT_ZOOM);
|
||||
UI.toggleMenu('siti');
|
||||
UI.sitesMenu('.menu-list', map, sites);
|
||||
|
||||
/*
|
||||
for (let site of Object.keys(sites)) {
|
||||
if (!site.includes('Vincoli')) {
|
||||
let layer = sites[site];
|
||||
const centerCoords = layer.getBounds().getCenter();
|
||||
UI.addSitesControl(map, centerCoords, site, GIS.INIT_ZOOM);
|
||||
}
|
||||
}
|
||||
*/
|
||||
});
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"source": {
|
||||
"include": ["caprigis.js", "index.js"],
|
||||
"include": ["gis.js", "ui.js", "index.js"],
|
||||
"includePattern": ".js$",
|
||||
"excludePattern": "(vendor/|docs)"
|
||||
},
|
||||
|
8
js/ui.js
8
js/ui.js
@ -6,9 +6,9 @@
|
||||
const UI = {};
|
||||
|
||||
/**
|
||||
* Add a control to center the map
|
||||
* @param {Map} map
|
||||
* @param {LatLngExpression} centerCoords
|
||||
* Add a Leaflet control to center the map
|
||||
* @param {Map} map The Leaflet map object
|
||||
* @param {LatLngExpression} centerCoords The coordinates to center the map
|
||||
* @param {number} zoom Zoom level
|
||||
*/
|
||||
UI.addCenterMapControl = function (map, centerCoords, zoom) {
|
||||
@ -51,7 +51,7 @@ UI.toggleMenu = function (triggerId) {
|
||||
menu.classList.toggle('is-hidden');
|
||||
menu.classList.toggle('is-2');
|
||||
document.querySelector('#map').parentElement.classList.toggle('is-full');
|
||||
})
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Open a modal with DB data
|
||||
|
Loading…
Reference in New Issue
Block a user