forked from MapComplete/MapComplete
Show buttons for adding tags and importing
This commit is contained in:
parent
512282772a
commit
63bb1a4da3
2 changed files with 19 additions and 0 deletions
|
@ -42,6 +42,13 @@ export default class TagApplyButton implements AutoAction {
|
|||
|
||||
public static generateTagsToApply(spec: string, tagSource: Store<any>): Store<Tag[]> {
|
||||
|
||||
// Check whether we need to look up a single value
|
||||
|
||||
if (!spec.includes(";") && !spec.includes("=") && spec.includes("$")){
|
||||
// We seem to be dealing with a single value, fetch it
|
||||
spec = tagSource.data[spec.replace("$","")]
|
||||
}
|
||||
|
||||
const tgsSpec = spec.split(";").map(spec => {
|
||||
const kv = spec.split("=").map(s => s.trim());
|
||||
if (kv.length != 2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue