Stay organized with collections Save and categorize content based on your preferences.

blockly > RenderedConnection > closest

RenderedConnection.closest() method

Find the closest compatible connection to this connection. All parameters are in workspace units.


closest(maxLimit: number, dxy: Coordinate): {
        connection: RenderedConnection | null;
        radius: number;


Parameter Type Description
maxLimit number The maximum radius to another connection.
dxy Coordinate Offset between this connection's location in the database and the current location (as a result of dragging).


{ connection: RenderedConnection | null; radius: number; }

Contains two properties: 'connection' which is either another connection or null, and 'radius' which is the distance.