onBeforeConnectionCreate property

EdgeConnectionsModel<E>? Function(EdgeConnectionsModel<E> connection, NodeSocketModel<E> fromSocket, NodeSocketModel<E> toSocket)? onBeforeConnectionCreate
final

Callback triggered before a connection is created. It allows modifying the connection or returning null to cancel it.

Implementation

final EdgeConnectionsModel<E>? Function(
  EdgeConnectionsModel<E> connection,
  NodeSocketModel<E> fromSocket,
  NodeSocketModel<E> toSocket,
)?
onBeforeConnectionCreate;