Fix merge

This commit is contained in:
Pieter Vander Vennet 2023-10-02 01:23:43 +02:00
parent 0c9a4576c0
commit d6cd0516bb
7 changed files with 30 additions and 52 deletions

View file

@ -368,8 +368,7 @@ class ExpandTagRendering extends Conversion<
name +
": layer " +
layerName +
" not found. Maybe you meant on of " +
candidates.slice(0, 3).join(", ")
" not found for now, but ignoring as this is a bootstrapping run. "
)
} else {
errors.push(
@ -378,7 +377,7 @@ class ExpandTagRendering extends Conversion<
name +
": layer " +
layerName +
" not found. Maybe you meant on of " +
" not found. Maybe you meant one of " +
candidates.slice(0, 3).join(", ")
)
}

View file

@ -102,14 +102,15 @@ export default class PointRenderingConfig extends WithContextLoader {
)
}
}
this.iconSize = this.tr("iconSize", "40,40")
this.anchor = this.tr("anchor", "center")
this.label = this.tr("label", undefined)
this.rotation = this.tr("rotation", "0")
this.pitchAlignment = this.tr("pitchAlignment", "canvas")
this.iconSize = this.tr("iconSize", "40,40", context + ".iconsize")
this.anchor = this.tr("anchor", "center", context + ".anchor")
this.label = this.tr("label", undefined, context + ".label")
this.rotation = this.tr("rotation", "0", context + ".rotation")
this.pitchAlignment = this.tr("pitchAlignment", "canvas", context + ".pitchAlignment")
this.rotationAlignment = this.tr(
"rotationAlignment",
json.pitchAlignment === "map" ? "map" : "canvas"
json.pitchAlignment === "map" ? "map" : "canvas",
context + ".rotationAlignment"
)
}

View file

@ -18,6 +18,7 @@ import { FixedUiElement } from "../../UI/Base/FixedUiElement"
import { Paragraph } from "../../UI/Base/Paragraph"
import Svg from "../../Svg"
import Validators, { ValidatorType } from "../../UI/InputElement/Validators"
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
export interface Icon {}
@ -76,7 +77,11 @@ export default class TagRenderingConfig {
public readonly labels: string[]
public readonly classes: string[]
constructor(json: string | QuestionableTagRenderingConfigJson, context?: string) {
constructor(
config: string | TagRenderingConfigJson | QuestionableTagRenderingConfigJson,
context?: string
) {
let json = <string | QuestionableTagRenderingConfigJson>config
if (json === undefined) {
throw "Initing a TagRenderingConfig with undefined in " + context
}