chore(core): cleanup unused event arg (#1475)

chore(core): cleanup unused `event` arg
This commit is contained in:
Braks
2024-06-12 11:41:40 +02:00
parent a647472db4
commit 850f54aebd
3 changed files with 3 additions and 9 deletions

View File

@@ -134,7 +134,6 @@ export function useHandle({
x: x - containerBounds.left,
y: y - containerBounds.top,
},
event,
)
emits.connectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId), handleType })
@@ -256,7 +255,7 @@ export function useHandle({
if (!connectionClickStartHandle.value) {
emits.clickConnectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId) })
startConnection({ nodeId: toValue(nodeId), type: toValue(type), handleId: toValue(handleId) }, undefined, event, true)
startConnection({ nodeId: toValue(nodeId), type: toValue(type), handleId: toValue(handleId) }, undefined, true)
} else {
let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid

View File

@@ -615,7 +615,7 @@ export function useActions(
node.data = options.replace ? nextData : { ...node.data, ...nextData }
}
const startConnection: Actions['startConnection'] = (startHandle, position, event, isClick = false) => {
const startConnection: Actions['startConnection'] = (startHandle, position, isClick = false) => {
if (isClick) {
state.connectionClickStartHandle = startHandle
} else {

View File

@@ -289,12 +289,7 @@ export interface Actions extends Omit<ViewportHelper, 'viewportInitialized'> {
/** force update node internal data, if handle bounds are incorrect, you might want to use this */
updateNodeInternals: UpdateNodeInternals
/** start a connection */
startConnection: (
startHandle: ConnectingHandle,
position?: XYPosition,
event?: MouseEvent | TouchEvent,
isClick?: boolean,
) => void
startConnection: (startHandle: ConnectingHandle, position?: XYPosition, isClick?: boolean) => void
/** update connection position */
updateConnection: (position: XYPosition, result?: ConnectingHandle | null, status?: ConnectionStatus | null) => void
/** end (or cancel) a connection */