Skip to main content

Class: LabelFlyoutInflater

Defined in: packages/blockly/core/label_flyout_inflater.ts:18

Class responsible for creating labels for flyouts.

Implements​

Methods index​

MethodDescription
loadInflates a flyout label from the given state and adds it to the flyout.
gapForItemReturns the amount of space that should follow this label.
disposeItemDisposes of the given label.
getTypeReturns the type of items this inflater is responsible for creating.

Constructors​

Constructor​

new LabelFlyoutInflater(): LabelFlyoutInflater;

Returns​

LabelFlyoutInflater

Methods​

load()​

load(state, flyout): FlyoutItem;

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

Inflates a flyout label from the given state and adds it to the flyout.

Parameters​

ParameterTypeDescription
stateobjectA JSON representation of a flyout label.
flyoutIFlyoutThe flyout to create the label on.

Returns​

FlyoutItem

A FlyoutButton configured as a label.

Implementation of​

IFlyoutInflater.load


gapForItem()​

gapForItem(state, defaultGap): number;

Defined in: packages/blockly/core/label_flyout_inflater.ts:45

Returns the amount of space that should follow this label.

Parameters​

ParameterTypeDescription
stateobjectA JSON representation of a flyout label.
defaultGapnumberThe default spacing for flyout items.

Returns​

number

The amount of space that should follow this label.

Implementation of​

IFlyoutInflater.gapForItem


disposeItem()​

disposeItem(item): void;

Defined in: packages/blockly/core/label_flyout_inflater.ts:54

Disposes of the given label.

Parameters​

ParameterTypeDescription
itemFlyoutItemThe flyout label to dispose of.

Returns​

void

Implementation of​

IFlyoutInflater.disposeItem


getType()​

getType(): string;

Defined in: packages/blockly/core/label_flyout_inflater.ts:66

Returns the type of items this inflater is responsible for creating.

Returns​

string

An identifier for the type of items this inflater creates.

Implementation of​

IFlyoutInflater.getType