Improve share functionality
This commit is contained in:
parent
df6e47faa8
commit
6cd3c15544
6 changed files with 68 additions and 18 deletions
|
@ -601,6 +601,7 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
}
|
||||
json = { ...json }
|
||||
json.tagRenderings = [...(json.tagRenderings ?? [])]
|
||||
const allIds = new Set<string>(json.tagRenderings.map((tr) => tr["id"]))
|
||||
const specialVisualisations = ValidationUtils.getAllSpecialVisualisations(
|
||||
<any>json.tagRenderings
|
||||
)
|
||||
|
@ -658,11 +659,12 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
|
|||
})
|
||||
}
|
||||
|
||||
if (!usedSpecialFunctions.has("qr_code")) {
|
||||
json.tagRenderings.push({
|
||||
id: "qr_code",
|
||||
render: { "*": "{qr_code()}" },
|
||||
})
|
||||
if (!allIds.has("qr_code")) {
|
||||
json.tagRenderings.push(this._desugaring.tagRenderings.get("qr_code"))
|
||||
}
|
||||
|
||||
if (!allIds.has("share")) {
|
||||
json.tagRenderings.push(this._desugaring.tagRenderings.get("share"))
|
||||
}
|
||||
|
||||
if (!usedSpecialFunctions.has("all_tags")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue