chore(core): cleanup unused event arg (#1475)
chore(core): cleanup unused `event` arg
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user