chore(handle): remove setting elementBelow style onClick
* intended for hover
This commit is contained in:
@@ -195,7 +195,7 @@ export default (store: FlowStore = useVueFlow().store) => {
|
|||||||
if (node) validConnectFunc = (handleType !== 'target' ? node.isValidTargetPos : node.isValidSourcePos) ?? (() => true)
|
if (node) validConnectFunc = (handleType !== 'target' ? node.isValidTargetPos : node.isValidSourcePos) ?? (() => true)
|
||||||
}
|
}
|
||||||
const doc = getHostForElement(event.target as HTMLElement)
|
const doc = getHostForElement(event.target as HTMLElement)
|
||||||
const { connection, isValid, elementBelow } = checkElementBelowIsValid(
|
const { connection, isValid } = checkElementBelowIsValid(
|
||||||
event as MouseEvent,
|
event as MouseEvent,
|
||||||
store.connectionMode,
|
store.connectionMode,
|
||||||
store.connectionStartHandle.type === 'target',
|
store.connectionStartHandle.type === 'target',
|
||||||
@@ -207,12 +207,6 @@ export default (store: FlowStore = useVueFlow().store) => {
|
|||||||
|
|
||||||
const isOwnHandle = connection.source === connection.target
|
const isOwnHandle = connection.source === connection.target
|
||||||
|
|
||||||
if (!isOwnHandle && elementBelow) {
|
|
||||||
recentHoveredHandle = elementBelow
|
|
||||||
elementBelow.classList.add('vue-flow__handle-connecting')
|
|
||||||
elementBelow.classList.toggle('vue-flow__handle-valid', isValid)
|
|
||||||
}
|
|
||||||
|
|
||||||
store.hooks.connectStop.trigger(event)
|
store.hooks.connectStop.trigger(event)
|
||||||
|
|
||||||
if (isValid && !isOwnHandle) store.hooks.connect.trigger(connection)
|
if (isValid && !isOwnHandle) store.hooks.connect.trigger(connection)
|
||||||
|
|||||||
Reference in New Issue
Block a user