Refactoring: fix delete indication, fix splitroad, fix addition of multiple new points snapped onto the same way (all will properly attach now)

This commit is contained in:
Pieter Vander Vennet 2023-04-20 17:42:07 +02:00
parent 1f9aacfb29
commit 4172af6a72
118 changed files with 1422 additions and 1357 deletions

View file

@ -591,6 +591,13 @@ export class AddEditingElements extends DesugaringStep<LayerConfigJson> {
): { result: LayerConfigJson; errors?: string[]; warnings?: string[]; information?: string[] } {
json = JSON.parse(JSON.stringify(json))
if (
json.tagRenderings &&
!json.tagRenderings.some((tr) => tr === "just_created" || tr["id"] === "just_created")
) {
json.tagRenderings.unshift(this._desugaring.tagRenderings.get("just_created"))
}
if (json.allowSplit && !ValidationUtils.hasSpecialVisualisation(json, "split_button")) {
json.tagRenderings.push({
id: "split-button",