Skip to main content

Home > blockly > IFlyoutInflater > gapForItem

IFlyoutInflater.gapForItem() method

Returns the amount of spacing that should follow the element corresponding to the given JSON representation.

Signature:

gapForItem(state: object, defaultGap: number): number;

Parameters

ParameterTypeDescription
stateobjectA JSON representation of the element preceding the gap.
defaultGapnumberThe default gap for elements in this flyout.

Returns:

number

The gap that should follow the given element.