MapComplete/UI/BigComponents/SimpleAddUI.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.6 KiB
TypeScript
Raw Normal View History

2020-06-29 03:12:44 +02:00
/**
* Asks to add a feature at the last clicked location, at least if zoom is sufficient
*/
import { UIEventSource } from "../../Logic/UIEventSource"
import Translations from "../i18n/Translations"
2021-06-12 02:58:32 +02:00
import BaseUIElement from "../BaseUIElement"
2021-06-14 02:39:23 +02:00
import { VariableUiElement } from "../Base/VariableUIElement"
import Toggle from "../Input/Toggle"
import CreateNewNodeAction from "../../Logic/Osm/Actions/CreateNewNodeAction"
import { OsmObject, OsmWay } from "../../Logic/Osm/OsmObject"
import PresetConfig from "../../Models/ThemeConfig/PresetConfig"
import FilteredLayer from "../../Models/FilteredLayer"
2022-01-25 21:55:51 +01:00
import Loading from "../Base/Loading"
2022-03-23 12:42:47 +01:00
import Hash from "../../Logic/Web/Hash"
2022-10-27 01:50:41 +02:00
import { WayId } from "../../Models/OsmFeature"
2022-11-08 14:37:48 +01:00
import { Tag } from "../../Logic/Tags/Tag"
import { SpecialVisualizationState } from "../SpecialVisualization"
import { Feature } from "geojson"
import { FixedUiElement } from "../Base/FixedUiElement"
import Combine from "../Base/Combine"
2021-06-14 02:39:23 +02:00
/*
* The SimpleAddUI is a single panel, which can have multiple states:
* - A list of presets which can be added by the user
* - A 'confirm-selection' button (or alternatively: please enable the layer)
* - A 'something is wrong - please soom in further'
* - A 'read your unread messages before adding a point'
*/
export interface PresetInfo extends PresetConfig {
2021-06-14 02:39:23 +02:00
name: string | BaseUIElement
icon: () => BaseUIElement
2022-01-25 21:55:51 +01:00
layerToAddTo: FilteredLayer
boundsFactor?: 0.25 | number
2021-06-14 02:39:23 +02:00
}
2021-01-08 16:49:42 +01:00
export default class SimpleAddUI extends Combine {
constructor(state: SpecialVisualizationState) {
super([])
2020-06-29 03:12:44 +02:00
}
}