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,
|
x: x - containerBounds.left,
|
||||||
y: y - containerBounds.top,
|
y: y - containerBounds.top,
|
||||||
},
|
},
|
||||||
event,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
emits.connectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId), handleType })
|
emits.connectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId), handleType })
|
||||||
@@ -256,7 +255,7 @@ export function useHandle({
|
|||||||
if (!connectionClickStartHandle.value) {
|
if (!connectionClickStartHandle.value) {
|
||||||
emits.clickConnectStart({ event, nodeId: toValue(nodeId), handleId: toValue(handleId) })
|
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 {
|
} else {
|
||||||
let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid
|
let isValidConnectionHandler = toValue(isValidConnection) || isValidConnectionProp.value || alwaysValid
|
||||||
|
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ export function useActions(
|
|||||||
node.data = options.replace ? nextData : { ...node.data, ...nextData }
|
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) {
|
if (isClick) {
|
||||||
state.connectionClickStartHandle = startHandle
|
state.connectionClickStartHandle = startHandle
|
||||||
} else {
|
} 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 */
|
/** force update node internal data, if handle bounds are incorrect, you might want to use this */
|
||||||
updateNodeInternals: UpdateNodeInternals
|
updateNodeInternals: UpdateNodeInternals
|
||||||
/** start a connection */
|
/** start a connection */
|
||||||
startConnection: (
|
startConnection: (startHandle: ConnectingHandle, position?: XYPosition, isClick?: boolean) => void
|
||||||
startHandle: ConnectingHandle,
|
|
||||||
position?: XYPosition,
|
|
||||||
event?: MouseEvent | TouchEvent,
|
|
||||||
isClick?: boolean,
|
|
||||||
) => void
|
|
||||||
/** update connection position */
|
/** update connection position */
|
||||||
updateConnection: (position: XYPosition, result?: ConnectingHandle | null, status?: ConnectionStatus | null) => void
|
updateConnection: (position: XYPosition, result?: ConnectingHandle | null, status?: ConnectionStatus | null) => void
|
||||||
/** end (or cancel) a connection */
|
/** end (or cancel) a connection */
|
||||||
|
|||||||
Reference in New Issue
Block a user