Class: LabelFlyoutInflater
Defined in: packages/blockly/core/label_flyout_inflater.ts:18
Class responsible for creating labels for flyouts.
Implements
Methods index
| Method | Description |
|---|---|
| load | Inflates a flyout label from the given state and adds it to the flyout. |
| gapForItem | Returns the amount of space that should follow this label. |
| disposeItem | Disposes of the given label. |
| getType | Returns 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
| Parameter | Type | Description |
|---|---|---|
state | object | A JSON representation of a flyout label. |
flyout | IFlyout | The flyout to create the label on. |
Returns
A FlyoutButton configured as a label.
Implementation of
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
| Parameter | Type | Description |
|---|---|---|
state | object | A JSON representation of a flyout label. |
defaultGap | number | The default spacing for flyout items. |
Returns
number
The amount of space that should follow this label.
Implementation of
disposeItem()
disposeItem(item): void;
Defined in: packages/blockly/core/label_flyout_inflater.ts:54
Disposes of the given label.
Parameters
| Parameter | Type | Description |
|---|---|---|
item | FlyoutItem | The flyout label to dispose of. |
Returns
void
Implementation of
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.