fix(nodes): dont select nodes when selectable=false closes

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-23 14:01:02 +01:00
parent 0e803839d6
commit 17f7e4b0e7
+1 -1
View File
@@ -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))