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

Parameter Type Description
topBlock BlockSvg The top block of the block clump we want to try and connect to.
orphanBlock BlockSvg The orphan block that wants to find a home.
localType number The type of the connection being dragged.

Returns:

boolean

Whether there is a home for the orphan or not.