forked from MapComplete/MapComplete
New roaming rendering system which allows layers to push questions, badges and title-icons to all the other layers, improve bike-clean-services
This commit is contained in:
parent
77ffdc093a
commit
2a31badd3d
16 changed files with 427 additions and 394 deletions
|
@ -68,7 +68,7 @@ export default class AllLayersPanel extends UIElement {
|
|||
const layer = config.layers[i];
|
||||
if (typeof layer !== "string") {
|
||||
try {
|
||||
const iconTagRendering = new TagRenderingConfig(layer.icon, "icon")
|
||||
const iconTagRendering = new TagRenderingConfig(layer.icon, undefined, "icon")
|
||||
const icon = iconTagRendering.GetRenderValue({"id": "node/-1"}).txt;
|
||||
return `<img src='${icon}'>`
|
||||
} catch (e) {
|
||||
|
|
|
@ -111,7 +111,7 @@ export default class TagRenderingPanel extends InputElement<TagRenderingConfigJs
|
|||
|
||||
this.validText = new VariableUiElement(value.map((json: TagRenderingConfigJson) => {
|
||||
try{
|
||||
new TagRenderingConfig(json, options?.title ?? "");
|
||||
new TagRenderingConfig(json,undefined, options?.title ?? "");
|
||||
return "";
|
||||
}catch(e){
|
||||
return "<span class='alert'>"+e+"</span>"
|
||||
|
|
|
@ -40,7 +40,7 @@ export default class TagRenderingPreview extends UIElement {
|
|||
rendering =
|
||||
new VariableUiElement(es.map(tagRenderingConfig => {
|
||||
try {
|
||||
const tr = new EditableTagRendering(self.previewTagValue, new TagRenderingConfig(tagRenderingConfig, "preview"));
|
||||
const tr = new EditableTagRendering(self.previewTagValue, new TagRenderingConfig(tagRenderingConfig, undefined,"preview"));
|
||||
return tr.Render();
|
||||
} catch (e) {
|
||||
return new Combine(["Could not show this tagrendering:", e.message]).Render();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue