Class: Menu
Defined in: packages/blockly/core/menu.ts:26
A basic menu class.
Properties index
| Property | Description |
|---|---|
| openingCoords | Coordinates of the pointerdown event that caused this menu to open. Used to prevent the consequent pointerup event due to a simple click from activating a menu item immediately. |
Methods index
| Method | Description |
|---|---|
| render | Creates the menu DOM. |
| dispose | Dispose of this menu. |
| getId | - |
Constructors
Constructor
new Menu(): Menu;
Defined in: packages/blockly/core/menu.ts:70
Constructs a new Menu instance.
Returns
Menu
Properties
openingCoords
openingCoords: Coordinate | null = null;
Defined in: packages/blockly/core/menu.ts:37
Coordinates of the pointerdown event that caused this menu to open. Used to prevent the consequent pointerup event due to a simple click from activating a menu item immediately.
Methods
render()
render(container): HTMLDivElement;
Defined in: packages/blockly/core/menu.ts:89
Creates the menu DOM.
Parameters
| Parameter | Type | Description |
|---|---|---|
container | Element | Element upon which to append this menu. |
Returns
HTMLDivElement
The menu's root DOM element.
dispose()
dispose(): void;
Defined in: packages/blockly/core/menu.ts:185
Dispose of this menu.
Returns
void
getId()
getId(): string;
Defined in: packages/blockly/core/menu.ts:492
Returns
string