sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    disposed: boolean

    Has this connection been disposed of?

    targetConnection: Blockly.Connection

    Connection this connection connects to. Null if not connected.

    type: number
    x: number

    Horizontal location of this connection.

    y: number

    Vertical location of this connection.

    Methods

    • Checks whether the current connection can connect with the target connection.

      Parameters

      Returns number

      Blockly.Connection.CAN_CONNECT if the connection is legal, an error code otherwise.

      July 2020. Will be deleted July 2021. Use the workspace's connectionChecker instead.

    • Checks whether the current connection and target connection are compatible and throws an exception if they are not.

      Parameters

      Returns void

      July 2020. Will be deleted July 2021. Use the workspace's connectionChecker instead.

    • Is this connection compatible with another connection with respect to the value type system. E.g. square_root("Hello") is not compatible.

      Parameters

      Returns boolean

      True if the connections share a type.

      July 2020. Will be deleted July 2021. Use the workspace's connectionChecker instead.

    • Connect this connection to another connection.

      Parameters

      Returns void

    • Disconnect this connection.

      Returns void

    • Dispose of this connection and deal with connected blocks.

      Returns void

    • Get a connection's compatibility.

      Returns any[]

      List of compatible value types. Null if all types are compatible.

    • Get the parent input of a connection.

      Returns Input

      The input that the connection belongs to or null if no parent exists.

    • Returns the xml representation of the connection's shadow block.

      Parameters

      • OptionalreturnCurrent: boolean

        If true, and the shadow block is currently attached to this connection, this serializes the state of that block and returns it (so that field values are correct). Otherwise the saved shadowDom is just returned.

      Returns Element

      Shadow DOM representation of a block or null.

    • Is the connection connected?

      Returns boolean

      True if connection is connected to another connection.

    • Check if the two connections can be dragged to connect to each other.

      Parameters

      Returns boolean

      True if the connection is allowed, false otherwise.

      July 2020. Will be deleted July 2021. Use the workspace's connectionChecker instead.

    • Does the connection belong to a superior block (higher in the source stack)?

      Returns boolean

      True if connection faces down or right.

    • Find all nearby compatible connections to this connection. Type checking does not apply, since this function is used for bumping.

      Headless configurations (the default) do not have neighboring connection, and always return an empty list (the default). Blockly.RenderedConnection overrides this behavior with a list computed from the rendered positioning.

      Parameters

      • _maxLimit: number

        The maximum radius to another connection.

      Returns Blockly.Connection[]

      List of connections.

    • Called when an attempted connection fails. NOP by default (i.e. for headless workspaces).

      Parameters

      • _otherConnection: Blockly.Connection

        Connection that this connection failed to connect to.

      Returns void

    • Change a connection's compatibility.

      Parameters

      • check: string | string[]

        Compatible value type or list of value types. Null if all types are compatible.

      Returns Blockly.Connection

      The connection being modified (to allow chaining).

    • Changes the connection's shadow block.

      Parameters

      • shadow: Element

        DOM representation of a block or null.

      Returns void

    • Returns the block that this connection connects to.

      Returns Blockly.Block

      The connected block or null if none is connected.

    • This method returns a string describing this Connection in developer terms (English only). Intended to on be used in console logs and errors.

      Returns string

      The description.