Merge pull request #5704 from xyflow/fix/old-callback-reference
Fix old callback references passed to XYHandle
This commit is contained in:
@@ -53,12 +53,10 @@ export function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({
|
||||
const {
|
||||
autoPanOnConnect,
|
||||
domNode,
|
||||
isValidConnection,
|
||||
connectionMode,
|
||||
connectionRadius,
|
||||
lib,
|
||||
onConnectStart,
|
||||
onConnectEnd,
|
||||
cancelConnection,
|
||||
nodeLookup,
|
||||
rfId: flowId,
|
||||
@@ -93,10 +91,10 @@ export function EdgeUpdateAnchors<EdgeType extends Edge = Edge>({
|
||||
flowId,
|
||||
cancelConnection,
|
||||
panBy,
|
||||
isValidConnection,
|
||||
isValidConnection: (...args) => store.getState().isValidConnection?.(...args) ?? true,
|
||||
onConnect: onConnectEdge,
|
||||
onConnectStart: _onConnectStart,
|
||||
onConnectEnd,
|
||||
onConnectEnd: (...args) => store.getState().onConnectEnd?.(...args),
|
||||
onReconnectEnd: _onReconnectEnd,
|
||||
updateConnection,
|
||||
getTransform: () => store.getState().transform,
|
||||
|
||||
@@ -142,10 +142,10 @@ function HandleComponent(
|
||||
panBy: currentStore.panBy,
|
||||
cancelConnection: currentStore.cancelConnection,
|
||||
onConnectStart: currentStore.onConnectStart,
|
||||
onConnectEnd: currentStore.onConnectEnd,
|
||||
onConnectEnd: (...args) => store.getState().onConnectEnd?.(...args),
|
||||
updateConnection: currentStore.updateConnection,
|
||||
onConnect: onConnectExtended,
|
||||
isValidConnection: isValidConnection || currentStore.isValidConnection,
|
||||
isValidConnection: isValidConnection || ((...args) => store.getState().isValidConnection?.(...args) ?? true),
|
||||
getTransform: () => store.getState().transform,
|
||||
getFromHandle: () => store.getState().connection.fromHandle,
|
||||
autoPanSpeed: currentStore.autoPanSpeed,
|
||||
|
||||
Reference in New Issue
Block a user