You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a label's context menu is open and you click on the label to close it, the mouse-down closes the context menu, but the mouse-up reopens the menu. So if you click and hold on the label, then drag the SV image until your mouse is off the label, it remains closed.
It should clearly stay closed and not reopen :)
I don't remember the specifics, but I think @r-holland had said that it would be unnecessarily complicated to fix this because of how we trigger actions and the separation of the label's context menu code from the rest of the code (or something like that, memory is very hazy from something that was about a year ago).
The text was updated successfully, but these errors were encountered:
Looked into the code a bit. In MapService.js, the handlerViewControlLayerMouseUp(e) function causes the context menu to open. The logic looks like this:
if (contextMenuWasOpen) {
svl.contextMenu.hide();
} else {
svl.contextMenu.show(selectedLabel);
}
And in ContextMenu.js, there is a _handleMouseDown(e) function that is called on a mouse up that is not on the context menu.
ContextMenu.js's mouse down is called, which closes the context menu, and then MapService.js's mouse up is called, reopening the context menu.
Solutions are to either
Have ContextMenu.js leave the menu open on mouse down if the cursor is on the label as well, or
Have MapService.js leave the menu closed if the last mouse down closed the menu.
I think that we should just do whichever is easiest. My assumption is that option 1 is easier, but not 100% sure.
Related to #849.
If a label's context menu is open and you click on the label to close it, the mouse-down closes the context menu, but the mouse-up reopens the menu. So if you click and hold on the label, then drag the SV image until your mouse is off the label, it remains closed.
It should clearly stay closed and not reopen :)
I don't remember the specifics, but I think @r-holland had said that it would be unnecessarily complicated to fix this because of how we trigger actions and the separation of the label's context menu code from the rest of the code (or something like that, memory is very hazy from something that was about a year ago).
The text was updated successfully, but these errors were encountered: