2021-01-02 21:03:40 +01:00
|
|
|
import { UIEventSource } from "../UIEventSource"
|
2021-08-22 18:48:38 +02:00
|
|
|
import FilteredLayer from "../../Models/FilteredLayer"
|
2022-12-24 03:44:21 +01:00
|
|
|
import ScrollableFullScreen from "../../UI/Base/ScrollableFullScreen"
|
2022-01-14 01:41:19 +01:00
|
|
|
import BaseUIElement from "../../UI/BaseUIElement"
|
2020-06-29 03:12:44 +02:00
|
|
|
|
|
|
|
/**
|
2023-01-03 23:45:04 +01:00
|
|
|
* The stray-click-handler adds a marker to the map if no feature was clicked.
|
2020-06-29 03:12:44 +02:00
|
|
|
* Shows the given uiToShow-element in the messagebox
|
2023-01-03 23:45:04 +01:00
|
|
|
*
|
|
|
|
* Note: the actual implementation is in StrayClickHandlerImplementation
|
2020-06-29 03:12:44 +02:00
|
|
|
*/
|
2021-01-04 04:06:21 +01:00
|
|
|
export default class StrayClickHandler {
|
2022-12-24 03:44:21 +01:00
|
|
|
public static construct = (
|
2022-01-14 01:41:19 +01:00
|
|
|
state: {
|
|
|
|
LastClickLocation: UIEventSource<{ lat: number; lon: number }>
|
|
|
|
selectedElement: UIEventSource<string>
|
|
|
|
filteredLayers: UIEventSource<FilteredLayer[]>
|
2022-12-24 03:44:21 +01:00
|
|
|
leafletMap: UIEventSource<any>
|
2022-01-14 01:41:19 +01:00
|
|
|
},
|
|
|
|
uiToShow: ScrollableFullScreen,
|
|
|
|
iconToShow: BaseUIElement
|
2022-12-24 03:44:21 +01:00
|
|
|
) => {
|
|
|
|
return undefined
|
2020-06-29 03:12:44 +02:00
|
|
|
}
|
|
|
|
}
|