Fix issue where the edit menu would not disappear sometimes (close #7143)

Properly disable dragging the map under the edit menu for pointer events (re: #5505)
This commit is contained in:
Quincy Morgan
2020-03-25 14:33:42 -07:00
parent ad327befc7
commit 5c2a96dedb
2 changed files with 34 additions and 46 deletions
+4 -3
View File
@@ -146,9 +146,7 @@ export function modeSelect(context, selectedIDs) {
function closeMenu() {
if (editMenu) {
context.map().supersurface.call(editMenu.close);
}
if (editMenu) editMenu.close();
}
@@ -264,6 +262,9 @@ export function modeSelect(context, selectedIDs) {
}
});
// remove the existing menu element, if any
closeMenu();
editMenu = uiEditMenu(context, operations);
}