Clean tooltip string + some docs stuff...
This commit is contained in:
parent
038dcc0b7a
commit
c04a015c4a
@ -109,7 +109,10 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
||||
if (!layer.id.includes('area')) {
|
||||
const marker = L.marker(coords)
|
||||
.addTo(map)
|
||||
.bindTooltip(Object.keys(archeo).find(k => archeo[k] === layer))
|
||||
.bindTooltip(
|
||||
Object.keys(archeo).find(k => archeo[k] === layer)
|
||||
.replace(/\s\(.*$/, '')
|
||||
)
|
||||
.openTooltip();
|
||||
|
||||
if (typeof data === 'object') {
|
||||
@ -124,7 +127,6 @@ GIS.initMap = async function (mapId, zoomLevel = this.INIT_ZOOM) {
|
||||
/**
|
||||
* Adds layers to map and returns an object
|
||||
* with {baseMap, archeoLayers, sitesLayerGroup}
|
||||
*
|
||||
* @param {L.Map} map
|
||||
* @returns {{baseMap: {"OpenStreetMap": L.TileLayer}, archeo: object, sitesGroup: L.LayerGroup}}
|
||||
*/
|
||||
|
@ -13,7 +13,7 @@
|
||||
"recurse": true,
|
||||
"verbose": true,
|
||||
"theme_opts": {
|
||||
"theme": "light"
|
||||
"theme": "dark"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,5 +8,6 @@
|
||||
"bulma": "^1.0.1",
|
||||
"fontawesome-free": "^1.0.4",
|
||||
"leaflet": "^1.9.4"
|
||||
}
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
6
js/ui.js
6
js/ui.js
@ -40,6 +40,10 @@ UI.addCenterMapControl = function (map, centerCoords, zoom) {
|
||||
let centerCtr = new L.Control.CenterControl();
|
||||
map.addControl(centerCtr);
|
||||
}
|
||||
/**
|
||||
* Toggle burger menu for small screens
|
||||
* @param {string} burgerClass The CSS class of the burger element
|
||||
*/
|
||||
UI.toggleBurger = function(burgerClass) {
|
||||
const burger = document.querySelector(`.${burgerClass}`);
|
||||
burger.addEventListener('click', () => {
|
||||
@ -49,7 +53,7 @@ UI.toggleBurger = function(burgerClass) {
|
||||
});
|
||||
}
|
||||
/**
|
||||
*
|
||||
* Toggle side menu and rescale map container
|
||||
* @param {string} triggerId The ID of the trigger element
|
||||
*/
|
||||
UI.toggleMenu = function (triggerId) {
|
||||
|
Loading…
Reference in New Issue
Block a user