blockly > ConnectionChecker > canConnectToPrevious_

ConnectionChecker.canConnectToPrevious_() method

Helper function for drag checking.

Signature:

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

Parameters

Parameter Type Description
a Connection The connection to check, which must be a statement input or next connection.
b Connection A nearby connection to check, which must be a previous connection.

Returns:

boolean

True if the connection is allowed, false otherwise.