From a830820915f242bd726efb3f48666b0d1c393169 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Tue, 15 Feb 2022 13:32:32 -0800 Subject: [PATCH] Fixing graph editing (#18361) (#18398) --- src/sql/workbench/contrib/queryplan2/browser/queryPlan.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sql/workbench/contrib/queryplan2/browser/queryPlan.ts b/src/sql/workbench/contrib/queryplan2/browser/queryPlan.ts index 31a924f605..712494314b 100644 --- a/src/sql/workbench/contrib/queryplan2/browser/queryPlan.ts +++ b/src/sql/workbench/contrib/queryplan2/browser/queryPlan.ts @@ -347,6 +347,9 @@ export class QueryPlan2 implements ISashLayoutProvider { this.populate(graphRoot, diagramRoot); this.azdataGraphDiagram = new azdataGraph.azdataQueryPlan(container, diagramRoot, queryPlanNodeIconPaths); + this.azdataGraphDiagram.graph.setCellsMovable(false); // preventing drag and drop of graph nodes. + this.azdataGraphDiagram.graph.setCellsDisconnectable(false); // preventing graph edges to be disconnected from source and target nodes. + this.azdataGraphDiagram.graph.addListener('click', (sender, evt) => { // Updating properties view table on node clicks const cell = evt.properties['cell'];