Trashcan class
Class for a trash can.
Signature:
export declare class Trashcan extends DeleteArea implements IAutoHideable, IPositionable
Extends: DeleteArea
Implements: IAutoHideable, IPositionable
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
string | The unique id for this component that is used to register with the ComponentManager. | ||
boolean | Current open/close state of the lid. |
Methods
Method | Modifiers | Description |
|---|---|---|
Hides the component. Called in WorkspaceSvg.hideChaff. | ||
Inspect the contents of the trash. | ||
Closes the trashcan flyout. | ||
Flip the lid shut. Called externally after a drag. | ||
Returns true if the trashcan contents-flyout is currently open. | ||
Create the trash can elements. | ||
Dispose of this trash can. Unlink from all DOM elements to prevent memory leaks. | ||
Empties the trashcan's contents. If the contents-flyout is currently open it will be closed. | ||
Returns the bounding rectangle of the UI element in pixel units relative to the Blockly injection div. | ||
Returns the bounding rectangle of the drag target area in pixel units relative to viewport. | ||
Initializes the trash can. | ||
Handles when a cursor with a block or bubble exits this drag target. | ||
Handles when a cursor with a block or bubble is dragged over this drag target. | ||
Handles when a block or bubble is dropped on this component. Should not handle delete here. | ||
Opens the trashcan flyout. | ||
Positions the trashcan. It is positioned in the opposite corner to the corner the categories/toolbox starts at. |