forked from MapComplete/MapComplete
Add support for units to clean up tags when they enter mapcomplete; add example of this usage in the climbing theme, add climbing theme title icons with length and needed number of carabiners
This commit is contained in:
parent
89f6f606c8
commit
966fcda8d1
20 changed files with 302 additions and 111 deletions
|
@ -17,6 +17,7 @@ import {TagsFilter} from "../../Logic/Tags/TagsFilter";
|
|||
import {Tag} from "../../Logic/Tags/Tag";
|
||||
import SubstitutingTag from "../../Logic/Tags/SubstitutingTag";
|
||||
import BaseUIElement from "../../UI/BaseUIElement";
|
||||
import {Denomination, Unit} from "./Denomination";
|
||||
|
||||
export default class LayerConfig {
|
||||
|
||||
|
@ -46,6 +47,7 @@ export default class LayerConfig {
|
|||
width: TagRenderingConfig;
|
||||
dashArray: TagRenderingConfig;
|
||||
wayHandling: number;
|
||||
public readonly units: Unit[];
|
||||
|
||||
presets: {
|
||||
title: Translation,
|
||||
|
@ -56,8 +58,10 @@ export default class LayerConfig {
|
|||
tagRenderings: TagRenderingConfig [];
|
||||
|
||||
constructor(json: LayerConfigJson,
|
||||
units:Unit[],
|
||||
context?: string,
|
||||
official: boolean = true,) {
|
||||
this.units = units;
|
||||
context = context + "." + json.id;
|
||||
const self = this;
|
||||
this.id = json.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue