mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-09 03:24:13 +00:00
Fixes for context menu & selection
This commit is contained in:
parent
b084677cf7
commit
347a3de22c
@ -207,6 +207,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
setUpMapCallbacks() {
|
||||
if (!this.readonly) {
|
||||
this.toolsService.selectionToolActivation(true);
|
||||
}
|
||||
|
||||
const onNodeContextMenu = this.nodeWidget.onContextMenu.subscribe((eventNode: NodeContextMenu) => {
|
||||
const node = this.mapNodeToNode.convert(eventNode.node);
|
||||
this.contextMenu.openMenuForNode(node, eventNode.event.clientY, eventNode.event.clientX);
|
||||
@ -219,7 +223,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
|
||||
const onContextMenu = this.selectionTool.contextMenuOpened.subscribe((event) => {
|
||||
const selectedItems = this.selectionManager.getSelected();
|
||||
if (selectedItems.length === 0) return;
|
||||
if (selectedItems.length === 0 || !(event instanceof MouseEvent)) return;
|
||||
|
||||
let drawings: Drawing[] = [];
|
||||
let nodes: Node[] = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user