From f0cef6644b06ddbefdb565437d153bf6de5f8c29 Mon Sep 17 00:00:00 2001
From: Sipke Schoorstra <sipkeschoorstra@outlook.com>
Date: Thu, 18 Jan 2024 18:37:57 +0100
Subject: [PATCH] Upgrade dependencies and modify create-graph

Upgraded the version of all dependencies in package.json to their latest version. Also, an 'anchor' property has been added to the 'snap' object in the create-graph.ts file for better handling of node connections in the graph.
---
 .../ClientLib/package.json                    | 26 +++++++++----------
 .../src/designer/api/create-graph.ts          |  3 ++-
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/package.json b/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/package.json
index d3a32f86..8f5923e1 100644
--- a/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/package.json
+++ b/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/package.json
@@ -5,24 +5,24 @@
   "license": "MIT",
   "version": "1.0.0",
   "dependencies": {
-    "@antv/layout": "^0.3.24",
-    "@antv/x6": "^2.11.4",
+    "@antv/layout": "^0.3.25",
+    "@antv/x6": "^2.17.1",
     "@antv/x6-plugin-clipboard": "^2.1.6",
-    "@antv/x6-plugin-history": "^2.2.3",
-    "@antv/x6-plugin-keyboard": "^2.2.1",
-    "@antv/x6-plugin-scroller": "^2.0.9",
-    "@antv/x6-plugin-selection": "^2.1.7",
+    "@antv/x6-plugin-history": "^2.2.4",
+    "@antv/x6-plugin-keyboard": "^2.2.2",
+    "@antv/x6-plugin-scroller": "^2.0.10",
+    "@antv/x6-plugin-selection": "^2.2.1",
     "@antv/x6-plugin-snapline": "^2.1.7",
-    "@antv/x6-plugin-transform": "^2.1.7",
+    "@antv/x6-plugin-transform": "^2.1.8",
     "lodash.camelcase": "^4.3.0",
-    "uuid": "^9.0.0"
+    "uuid": "^9.0.1"
   },
   "devDependencies": {
-    "css-loader": "^6.8.1",
-    "style-loader": "^3.3.3",
-    "ts-loader": "^9.4.4",
-    "typescript": "^5.1.6",
-    "webpack": "^5.88.1",
+    "css-loader": "^6.9.0",
+    "style-loader": "^3.3.4",
+    "ts-loader": "^9.5.1",
+    "typescript": "^5.3.3",
+    "webpack": "^5.89.0",
     "webpack-cli": "^5.1.4"
   },
   "scripts": {
diff --git a/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/designer/api/create-graph.ts b/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/designer/api/create-graph.ts
index 313a976a..8f948250 100644
--- a/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/designer/api/create-graph.ts
+++ b/src/modules/Elsa.Studio.Workflows.Designer/ClientLib/src/designer/api/create-graph.ts
@@ -60,7 +60,8 @@ export async function createGraph(containerId: string, componentRef: DotNetCompo
             connectionPoint: 'anchor',
             allowBlank: false,
             snap: {
-                radius: 20
+                radius: 20,
+                anchor: "bbox"
             },
             createEdge() {
                 return graph.createEdge({