Skip to main content

Home > blockly > ConnectionChecker > canConnectToPrevious_

ConnectionChecker.canConnectToPrevious_() method

Helper function for drag checking.

Signature:

protected canConnectToPrevious_(a: Connection, b: Connection): boolean;

Parameters

ParameterTypeDescription
aConnectionThe connection to check, which must be a statement input or next connection.
bConnectionA nearby connection to check, which must be a previous connection.

Returns:

boolean

True if the connection is allowed, false otherwise.