refactor(flow)!: properly nest components

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 6bdea72b20
commit c96f62f622
12 changed files with 121 additions and 149 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ export default (store: FlowStore = useStore()) =>
if (!doc) return
let validConnectFunc: ValidConnectionFunc = isValidConnection ?? (() => true)
if (!isValidConnection) {
const node = store.getNodes.find((n) => n.id === nodeId)
const node = store.getNode(nodeId)
if (node) validConnectFunc = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) ?? (() => true)
}
const elementBelow = doc.elementFromPoint(event.clientX, event.clientY)