From 17f7e4b0e73656f683e63d76b9c8ee08f92a86c1 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Tue, 23 Nov 2021 14:01:02 +0100 Subject: [PATCH] fix(nodes): dont select nodes when selectable=false closes Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com> --- src/utils/graph.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/graph.ts b/src/utils/graph.ts index d143433a..5b788614 100644 --- a/src/utils/graph.ts +++ b/src/utils/graph.ts @@ -242,7 +242,7 @@ export const getNodesInside = (nodes: GraphNode[], rect: Rect, [tx, ty, tScale]: }) return nodes.filter((node) => { - if (!node.__vf) return false + if (!node.__vf || !node.selectable) return false const { position = { x: 0, y: 0 }, width = 0, height = 0, isDragging = false } = node.__vf const nBox = rectToBox({ ...position, width, height } as any) const xOverlap = Math.max(0, Math.min(rBox.x2, nBox.x2) - Math.max(rBox.x, nBox.x))