blockly > IFlyoutInflater

IFlyoutInflater interface

Signature:

export interface IFlyoutInflater 

Methods

Method Description
disposeItem(item)

Disposes of the given element.

If the element in question resides on the flyout workspace, it should remove itself. Implementers are not otherwise required to fully dispose of the element; it may be e.g. cached for performance purposes.

gapForItem(state, defaultGap) Returns the amount of spacing that should follow the element corresponding to the given JSON representation.
getType() Returns the type of items that this inflater is responsible for inflating. This should be the same as the name under which this inflater registers itself, as well as the value returned by getType() on the FlyoutItem objects returned by load().
load(state, flyout)

Loads the object represented by the given state onto the workspace.

Note that this method's interface is identical to that in ISerializer, to allow for code reuse.