diff --git a/Models/ThemeConfig/LineRenderingConfig.ts b/Models/ThemeConfig/LineRenderingConfig.ts index 05da6604e0..96f7f0a1ae 100644 --- a/Models/ThemeConfig/LineRenderingConfig.ts +++ b/Models/ThemeConfig/LineRenderingConfig.ts @@ -29,7 +29,7 @@ public GenerateLeafletStyle( tags: {} ): { color: string, weight: number, - dashArray: number[], + dashArray: string, offset: number } { function rendernum(tr: TagRenderingConfig, deflt: number) { @@ -49,7 +49,7 @@ public GenerateLeafletStyle( tags: {} ): return Utils.SubstituteKeys(str, tags)?.replace(/{.*}/g, ""); } - const dashArray = render(this.dashArray)?.split(" ")?.map(Number); + const dashArray = render(this.dashArray); let color = render(this.color, "#00f"); if (color.startsWith("--")) { color = getComputedStyle(document.body).getPropertyValue( diff --git a/UI/Popup/FeatureInfoBox.ts b/UI/Popup/FeatureInfoBox.ts index 58a07cc3a6..9b95512a99 100644 --- a/UI/Popup/FeatureInfoBox.ts +++ b/UI/Popup/FeatureInfoBox.ts @@ -78,15 +78,19 @@ export default class FeatureInfoBox extends ScrollableFullScreen { renderingsForGroup.push(questionBox) } else { let classes = innerClasses - if(renderingsForGroup.length === 0 && i > 0){ + let isHeader = renderingsForGroup.length === 0 && i > 0 + if(isHeader){ // This is the first element of a group! // It should act as header and be sticky - classes= "sticky top-0" + classes= "" } const etr = new EditableTagRendering(tags, tr, layerConfig.units,{ innerElementClasses: innerClasses }) + if(isHeader){ + etr.SetClass("sticky top-0") + } renderingsForGroup.push(etr) } } diff --git a/assets/layers/left_right_style/left_right_style.json b/assets/layers/left_right_style/left_right_style.json index f198f626a7..57ec143ef3 100644 --- a/assets/layers/left_right_style/left_right_style.json +++ b/assets/layers/left_right_style/left_right_style.json @@ -11,10 +11,21 @@ }, "mapRendering": [ { - "location": [ - "point" - ] - }, - {} + "width": 15, + "color": { + "render": "#ff000088", + "mappings": [{ + "if": "id=left", + "then": "#0000ff88" + }] + }, + "offset": { + "render": "-15", + "mappings": [{ + "if": "id=right", + "then": "15" + }] + } + } ] } \ No newline at end of file diff --git a/assets/themes/grb_import/grb.json b/assets/themes/grb_import/grb.json index 3a97f1c9ab..ab379c070c 100644 --- a/assets/themes/grb_import/grb.json +++ b/assets/themes/grb_import/grb.json @@ -29,35 +29,39 @@ "maxCacheAge": 0 }, "minzoom": 18, - "width": { - "render": "2" - }, - "color": { - "render": "#00c", - "mappings": [ - { - "if": "building=house", - "then": "#a00" + "mapRendering": [ + { + "width": { + "render": "2" }, - { - "if": "building=shed", - "then": "#563e02" - }, - { - "if": { - "or": [ - "building=garage", - "building=garages" - ] - }, - "then": "#f9bfbb" - }, - { - "if": "building=yes", - "then": "#0774f2" + "color": { + "render": "#00c", + "mappings": [ + { + "if": "building=house", + "then": "#a00" + }, + { + "if": "building=shed", + "then": "#563e02" + }, + { + "if": { + "or": [ + "building=garage", + "building=garages" + ] + }, + "then": "#f9bfbb" + }, + { + "if": "building=yes", + "then": "#0774f2" + } + ] } - ] - }, + } + ], "title": "OSM-gebouw", "tagRenderings": [ "all_tags" @@ -93,12 +97,16 @@ "maxCacheAge": 0 }, "minzoom": 18, - "color": { - "render": "#00c" - }, - "width": { - "render": "1" - }, + "mapRendering": [ + { + "color": { + "render": "#00c" + }, + "width": { + "render": "1" + } + } + ], "title": { "render": { "*": "OSM-Object" @@ -265,26 +273,34 @@ } } ], - "label": { - "mappings": [ - { - "if": "addr:housenumber~*", - "then": "