From fe7210b4f83c04f7ef4fd8bd8e57c667f914744f Mon Sep 17 00:00:00 2001 From: M-Wicenec Date: Thu, 12 Oct 2023 17:20:20 +0800 Subject: [PATCH] middle mouse on graph is now dragging the background instead of the nodes in the foreground --- src/GraphRenderer.ts | 5 ++--- src/Utils.ts | 1 - src/graphConfig.ts | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/GraphRenderer.ts b/src/GraphRenderer.ts index 52b6cd6c2..75c732923 100644 --- a/src/GraphRenderer.ts +++ b/src/GraphRenderer.ts @@ -503,7 +503,6 @@ export class GraphRenderer { } }) - //construct resizing if(node.getParentKey() != null){ if(oldParent.getRadius()>GraphRenderer.NodeParentRadiusPreDrag+GraphConfig.CONSTRUCT_DRAG_OUT_DISTANCE){ @@ -571,7 +570,7 @@ export class GraphRenderer { static startDrag = (node: Node, event: MouseEvent) : void => { const eagle = Eagle.getInstance(); - if(node === null){ + if(node === null || event.which === 2){ eagle.isDragging(true); } else if(!node.isEmbedded()){ @@ -587,8 +586,8 @@ export class GraphRenderer { } } - //select handlers + //select handlers if(node !== null){ // check if shift key is down, if so, add or remove selected node to/from current selection if (node !== null && event.shiftKey && !event.altKey){ diff --git a/src/Utils.ts b/src/Utils.ts index 0844ad235..59f3973a3 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -591,7 +591,6 @@ export class Utils { }else{ $('#confirmModalDontShowAgain button').text('check_box_outline_blank') } - console.log($('#confirmModalDontShowAgain button').text()) }) } diff --git a/src/graphConfig.ts b/src/graphConfig.ts index 469926b40..c76601486 100644 --- a/src/graphConfig.ts +++ b/src/graphConfig.ts @@ -8,7 +8,10 @@ const colors: { name: string; color: string; }[] = [ color: '#d4d4d4' },{ name: 'constructBg', - color: '#0000001f' + color: '#0000001a' + },{ + name: 'embeddedApp', + color: '#c5c5c5' },{ name: 'constructIcon', color: '#0000000f'