Add layer icon to filter view

This commit is contained in:
Pieter Vander Vennet 2021-10-30 02:34:16 +02:00
parent 1cfcfea314
commit f5d6441b70
6 changed files with 55 additions and 39 deletions

View file

@ -187,7 +187,10 @@ export default class PointRenderingConfig extends WithContextLoader {
public GenerateLeafletStyle(
tags: UIEventSource<any>,
clickable: boolean
clickable: boolean,
options?: {
noSize: false | boolean
}
):
{
html: BaseUIElement;
@ -237,9 +240,13 @@ export default class PointRenderingConfig extends WithContextLoader {
const iconAndBadges = new Combine([this.GetSimpleIcon(tags), this.GetBadges(tags)])
.SetStyle(`width: ${iconW}px; height: ${iconH}px`)
.SetClass("block relative")
if(!options?.noSize){
iconAndBadges.SetStyle(`width: ${iconW}px; height: ${iconH}px`)
}else{
iconAndBadges.SetClass("w-full h-full")
}
return {
html: new Combine([iconAndBadges, this.GetLabel(tags)]).SetStyle("flex flex-col"),