mapcomplete/UI/BigComponents/SimpleAddUI.ts

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

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
*/
2021-06-12 02:58:32 +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
/*
* 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
}