prevent map panels from covering up edit menu, fixes #10495 (#10586)

This commit is contained in:
Devin Fahnestock
2024-12-13 09:08:50 -05:00
committed by GitHub
parent bb2596aa9b
commit 313022728c
3 changed files with 14 additions and 5 deletions
+8 -5
View File
@@ -54,6 +54,7 @@ export function uiInit(context) {
var _lastPointerType;
var overMap;
function render(container) {
@@ -160,7 +161,7 @@ export function uiInit(context) {
.attr('dir', 'ltr')
.call(map);
var overMap = content
overMap = content
.append('div')
.attr('class', 'over-map');
@@ -665,14 +666,16 @@ export function uiInit(context) {
.triggerType(triggerType)
.operations(operations);
// render the menu
context.map().supersurface.call(_editMenu);
// render the menu onto the overmap
overMap
.call(_editMenu);
};
ui.closeEditMenu = function() {
// remove any existing menu no matter how it was added
context.map().supersurface
.select('.edit-menu').remove();
if (overMap !== undefined) {
overMap.select('.edit-menu').remove();
}
};