Skip to content

Commit 850f54a

Browse files
committed
chore(core): cleanup unused event arg (#1475)
chore(core): cleanup unused `event` arg
1 parent a647472 commit 850f54a

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

packages/core/src/composables/useHandle.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ export function useHandle({
134134
x: x - containerBounds.left,
135135
y: y - containerBounds.top,
136136
},
137-
event,
138137
)
139138

140139
emits.connectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId), handleType })
@@ -256,7 +255,7 @@ export function useHandle({
256255
if (!connectionClickStartHandle.value) {
257256
emits.clickConnectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId) })
258257

259-
startConnection({ nodeId: toValue(nodeId), type: toValue(type), handleId: toValue(handleId) }, undefined, event, true)
258+
startConnection({ nodeId: toValue(nodeId), type: toValue(type), handleId: toValue(handleId) }, undefined, true)
260259
} else {
261260
let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid
262261

packages/core/src/store/actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export function useActions(
615615
node.data = options.replace ? nextData : { ...node.data, ...nextData }
616616
}
617617

618-
const startConnection: Actions['startConnection'] = (startHandle, position, event, isClick = false) => {
618+
const startConnection: Actions['startConnection'] = (startHandle, position, isClick = false) => {
619619
if (isClick) {
620620
state.connectionClickStartHandle = startHandle
621621
} else {

packages/core/src/types/store.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,7 @@ export interface Actions extends Omit<ViewportHelper, 'viewportInitialized'> {
289289
/** force update node internal data, if handle bounds are incorrect, you might want to use this */
290290
updateNodeInternals: UpdateNodeInternals
291291
/** start a connection */
292-
startConnection: (
293-
startHandle: ConnectingHandle,
294-
position?: XYPosition,
295-
event?: MouseEvent | TouchEvent,
296-
isClick?: boolean,
297-
) => void
292+
startConnection: (startHandle: ConnectingHandle, position?: XYPosition, isClick?: boolean) => void
298293
/** update connection position */
299294
updateConnection: (position: XYPosition, result?: ConnectingHandle | null, status?: ConnectionStatus | null) => void
300295
/** end (or cancel) a connection */

0 commit comments

Comments
 (0)