From cc6598fc2b12f5cf421c06df09db5c5c66599ea8 Mon Sep 17 00:00:00 2001 From: Xia Wenqi Date: Thu, 11 Jan 2024 23:46:38 +0800 Subject: [PATCH] fix: snap anchor should be optional --- packages/x6/src/graph/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/x6/src/graph/options.ts b/packages/x6/src/graph/options.ts index c04778f9f9b..67faa5fd3d5 100644 --- a/packages/x6/src/graph/options.ts +++ b/packages/x6/src/graph/options.ts @@ -111,7 +111,7 @@ export namespace Options { /** * Snap edge to the closest node/port in the given radius on dragging. */ - snap: boolean | { radius: number; anchor: 'center' | 'bbox' } + snap: boolean | { radius: number; anchor?: 'center' | 'bbox' } /** * Specify whether connect to point on the graph is allowed.