mapcomplete/UI/BigComponents/SimpleAddUI.ts

22 lines
761 B
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
*/
2022-09-08 21:40:48 +02:00
import BaseUIElement from "../BaseUIElement"
import PresetConfig from "../../Models/ThemeConfig/PresetConfig"
import FilteredLayer from "../../Models/FilteredLayer"
2021-06-14 02:39:23 +02:00
/*
2022-09-08 21:40:48 +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'
2021-06-14 02:39:23 +02:00
*/
export interface PresetInfo extends PresetConfig {
2022-09-08 21:40:48 +02:00
name: string | BaseUIElement
icon: () => BaseUIElement
layerToAddTo: FilteredLayer
2022-01-25 21:55:51 +01:00
boundsFactor?: 0.25 | number
2021-06-14 02:39:23 +02:00
}