forked from MapComplete/MapComplete
Switch to a panel based UI, fix #552
This commit is contained in:
parent
4d930ae985
commit
494a49bc48
9 changed files with 148 additions and 204 deletions
|
@ -53,18 +53,11 @@ export default class StrayClickHandler {
|
|||
popupAnchor: [0, -45],
|
||||
}),
|
||||
})
|
||||
const popup = L.popup({
|
||||
autoPan: true,
|
||||
autoPanPaddingTopLeft: [15, 15],
|
||||
closeOnEscapeKey: true,
|
||||
autoClose: true,
|
||||
}).setContent("<div id='strayclick' style='height: 65vh'></div>")
|
||||
|
||||
self._lastMarker.addTo(leafletMap.data)
|
||||
self._lastMarker.bindPopup(popup)
|
||||
|
||||
self._lastMarker.on("click", () => {
|
||||
if (leafletMap.data.getZoom() < Constants.userJourney.minZoomLevelToAddNewPoints) {
|
||||
self._lastMarker.closePopup()
|
||||
leafletMap.data.flyTo(
|
||||
clickCoor,
|
||||
Constants.userJourney.minZoomLevelToAddNewPoints
|
||||
|
@ -72,7 +65,6 @@ export default class StrayClickHandler {
|
|||
return
|
||||
}
|
||||
|
||||
uiToShow.AttachTo("strayclick")
|
||||
uiToShow.Activate()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue