Add metacalculation on currentview

This commit is contained in:
Pieter Vander Vennet 2021-12-11 02:19:28 +01:00
parent c76b0a6340
commit 65b1891cb6
8 changed files with 85 additions and 27 deletions

View file

@ -57,14 +57,15 @@ export default class LeftControls extends Combine {
return defaultIcon;
}
const tags = {...feature.properties, button: "yes"}
const elem = currentViewFL.layerDef.mapRendering[0]?.GenerateLeafletStyle(tags, false, {
const elem = currentViewFL.layerDef.mapRendering[0]?.GenerateLeafletStyle(new UIEventSource(tags), false, {
noSize: true
})?.html
console.log("Elem is ", elem, "for", tags)
if(elem === undefined){
return defaultIcon
}
return elem
}))
})).SetClass("inline-block w-full h-full")
const featureBox = new VariableUiElement(feature.map(feature => {
if(feature === undefined){return undefined}
@ -81,7 +82,7 @@ export default class LeftControls extends Combine {
guiState.currentViewControlIsOpened
)
}).SetClass("inline-block w-full").onClick(() => {
}).onClick(() => {
guiState.currentViewControlIsOpened.setData(true)
}),