Fix bug with add buttons not always working
This commit is contained in:
parent
dc0da41fb1
commit
c688c42258
1 changed files with 3 additions and 2 deletions
|
@ -32,15 +32,16 @@ export class StrayClickHandler {
|
||||||
self._lastMarker = L.marker([lastClick.lat, lastClick.lon]);
|
self._lastMarker = L.marker([lastClick.lat, lastClick.lon]);
|
||||||
const uiElement = uiToShow();
|
const uiElement = uiToShow();
|
||||||
const popup = L.popup().setContent(uiElement.Render());
|
const popup = L.popup().setContent(uiElement.Render());
|
||||||
uiElement.Activate();
|
|
||||||
uiElement.Update();
|
uiElement.Update();
|
||||||
|
uiElement.Activate();
|
||||||
self._lastMarker.addTo(map);
|
self._lastMarker.addTo(map);
|
||||||
self._lastMarker.bindPopup(popup).openPopup();
|
self._lastMarker.bindPopup(popup).openPopup();
|
||||||
|
|
||||||
self._lastMarker.on("click", () => {
|
self._lastMarker.on("click", () => {
|
||||||
leftMessage.setData(self._uiToShow);
|
leftMessage.setData(self._uiToShow);
|
||||||
});
|
});
|
||||||
|
uiElement.Update();
|
||||||
|
uiElement.Activate();
|
||||||
});
|
});
|
||||||
|
|
||||||
selectElement.addCallback(() => {
|
selectElement.addCallback(() => {
|
||||||
|
|
Loading…
Reference in a new issue