Skip to main content

Home > blockly > blockRendering > Renderer > orphanCanConnectAtEnd

blockRendering.Renderer.orphanCanConnectAtEnd() method

Checks if an orphaned block can connect to the "end" of the topBlock's block-clump. If the clump is a row the end is the last input. If the clump is a stack, the end is the last next connection. If the clump is neither, then this returns false.

Signature:

protected orphanCanConnectAtEnd(topBlock: BlockSvg, orphanBlock: BlockSvg, localType: number): boolean;

Parameters

ParameterTypeDescription
topBlockBlockSvgThe top block of the block clump we want to try and connect to.
orphanBlockBlockSvgThe orphan block that wants to find a home.
localTypenumberThe type of the connection being dragged.

Returns:

boolean

Whether there is a home for the orphan or not.