Merge branch 'master' into develop

This commit is contained in:
Pieter Vander Vennet 2022-11-14 01:48:20 +01:00
commit 7fe841ad89
24 changed files with 186 additions and 135 deletions

View file

@ -157,6 +157,10 @@ export default class SimpleAddUI extends Toggle {
cancel,
() => {
isShown.setData(false)
},
{
cancelIcon: Svg.back_svg(),
cancelText: Translations.t.general.add.backToSelect,
}
)
})

View file

@ -19,6 +19,7 @@ import { GlobalFilter } from "../../Logic/State/MapState"
import { VariableUiElement } from "../Base/VariableUIElement"
import { Tag } from "../../Logic/Tags/Tag"
import { WayId } from "../../Models/OsmFeature"
import { Translation } from "../i18n/Translation"
export default class ConfirmLocationOfPoint extends Combine {
constructor(
@ -39,7 +40,11 @@ export default class ConfirmLocationOfPoint extends Combine {
snapOntoWayId: WayId | undefined
) => void,
cancel: () => void,
closePopup: () => void
closePopup: () => void,
options?: {
cancelIcon: BaseUIElement
cancelText?: string | Translation
}
) {
let preciseInput: LocationInput = undefined
if (preset.preciseInput !== undefined) {
@ -222,8 +227,8 @@ export default class ConfirmLocationOfPoint extends Combine {
const tagInfo = SimpleAddUI.CreateTagInfoFor(preset, state.osmConnection)
const cancelButton = new SubtleButton(
Svg.close_ui(),
Translations.t.general.cancel
options?.cancelIcon ?? Svg.close_ui(),
options?.cancelText ?? Translations.t.general.cancel
).onClick(cancel)
let examples: BaseUIElement = undefined