Skip to main content

Class: Menu

Defined in: packages/blockly/core/menu.ts:26

A basic menu class.

Properties index

PropertyDescription
openingCoordsCoordinates 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

MethodDescription
renderCreates the menu DOM.
disposeDispose 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

ParameterTypeDescription
containerElementElement 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