blockly > Connection > getConnectionForOrphanedConnection
Connection.getConnectionForOrphanedConnection() method
Returns the connection (starting at the startBlock) which will accept the given connection. This includes compatible connection types and connection checks.
Signature:
static getConnectionForOrphanedConnection(startBlock: Block, orphanConnection: Connection): Connection | null;
Parameters
Parameter | Type | Description |
---|---|---|
startBlock | Block | The block on which to start the search. |
orphanConnection | Connection | The connection that is looking for a home. |
Returns:
Connection | null
The suitable connection point on the chain of blocks, or null.