sesaparcours
    Preparing search index...

    Fake class which should be extended to avoid inheriting static properties

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    flyout: IFlyout

    The trashcan flyout.

    id: string

    The unique id for this component that is used to register with the ComponentManager.

    isLidOpen: boolean

    Current open/close state of the lid.

    Methods

    • Hides the component. Called in Blockly.hideChaff.

      Parameters

      • onlyClosePopups: boolean

        Whether only popups should be closed. Flyouts should not be closed if this is true.

      Returns void

    • Inspect the contents of the trash.

      Returns void

    • Closes the trashcan flyout.

      Returns void

    • Flip the lid shut. Called externally after a drag.

      Returns void

    • Returns true if the trashcan contents-flyout is currently open.

      Returns boolean

      True if the trashcan contents-flyout is currently open.

    • Create the trash can elements.

      Returns SVGElement

      The trash can's SVG group.

    • Dispose of this trash can. Unlink from all DOM elements to prevent memory leaks.

      Returns void

    • Empties the trashcan's contents. If the contents-flyout is currently open it will be closed.

      Returns void

    • Returns the bounding rectangle of the UI element in pixel units relative to the Blockly injection div.

      Returns Blockly.utils.Rect

      The UI elements’s bounding box. Null if bounding box should be ignored by other UI elements.

    • Returns the bounding rectangle of the drag target area in pixel units relative to viewport.

      Returns Blockly.utils.Rect

      The component's bounding box. Null if drag target area should be ignored.

    • Initializes the trash can.

      Returns void

    • Handles when a cursor with a block or bubble enters this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a cursor with a block or bubble exits this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a cursor with a block or bubble is dragged over this drag target.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Handles when a block or bubble is dropped on this component. Should not handle delete here.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns void

    • Opens the trashcan flyout.

      Returns void

    • Positions the trashcan. It is positioned in the opposite corner to the corner the categories/toolbox starts at.

      Parameters

      • metrics: UiMetrics

        The workspace metrics.

      • savedPositions: Blockly.utils.Rect[]

        List of rectangles that are already on the workspace.

      Returns void

    • Flip the lid open or shut.

      Parameters

      • state: boolean

        True if open.

      Returns void

    • Returns whether the provided block or bubble should not be moved after being dropped on this component. If true, the element will return to where it was when the drag started.

      Parameters

      • _dragElement: IDraggable

        The block or bubble currently being dragged.

      Returns boolean

      Whether the block or bubble provided should be returned to drag start.

    • Returns whether the provided block or bubble would be deleted if dropped on this area. This method should check if the element is deletable and is always called before onDragEnter/onDragOver/onDragExit.

      Parameters

      • element: IDraggable

        The block or bubble currently being dragged.

      • couldConnect: boolean

        Whether the element could could connect to another.

      Returns boolean

      Whether the element provided would be deleted if dropped on this area.