fix(core): check if valid connection func exists
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -62,7 +62,7 @@ export default function useHandle({
|
|||||||
|
|
||||||
let isValidConnectionHandler = isValidConnection || isValidConnectionProp.value || alwaysValid
|
let isValidConnectionHandler = isValidConnection || isValidConnectionProp.value || alwaysValid
|
||||||
|
|
||||||
if (!isValidConnection) {
|
if (!isValidConnectionHandler) {
|
||||||
if (node) isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid
|
if (node) isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ export default function useHandle({
|
|||||||
|
|
||||||
const node = findNode(unref(nodeId))
|
const node = findNode(unref(nodeId))
|
||||||
|
|
||||||
if (!isValidConnection) {
|
if (!isValidConnectionHandler) {
|
||||||
if (node) isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid
|
if (node) isValidConnectionHandler = (!isTarget ? node.isValidTargetPos : node.isValidSourcePos) || alwaysValid
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ export default defineComponent({
|
|||||||
const style = (attrs.style ?? {}) as CSSProperties
|
const style = (attrs.style ?? {}) as CSSProperties
|
||||||
const slot = miniMapSlots[`node-${props.type}`]
|
const slot = miniMapSlots[`node-${props.type}`]
|
||||||
|
|
||||||
if (slot) return slot!(props)
|
if (slot) {
|
||||||
|
return slot(props)
|
||||||
|
}
|
||||||
|
|
||||||
return h('rect', {
|
return h('rect', {
|
||||||
id: props.id,
|
id: props.id,
|
||||||
|
|||||||
Reference in New Issue
Block a user