Add presets to custom theme generator, fix simpleAddUI

This commit is contained in:
Pieter Vander Vennet 2020-09-03 03:16:43 +02:00
parent 9a420efa98
commit 3d05999f85
10 changed files with 90 additions and 36 deletions

View file

@ -170,6 +170,9 @@ function updateFavs() {
for (const layouts of State.state.installedThemes.data) {
for (const layer of layouts.layout.layers) {
if (typeof layer === "string") {
continue;
}
if (layer.id === fav) {
layoutToUse.layers.push(layer);
}
@ -200,7 +203,9 @@ State.state.selectedElement.addCallback((feature) => {
const data = feature.feature.properties;
// Which is the applicable set?
for (const layer of layoutToUse.layers) {
if (typeof layer === "string") {
continue;
}
const applicable = layer.overpassFilter.matches(TagUtils.proprtiesToKV(data));
if (applicable) {
// This layer is the layer that gives the questions