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
Parameter | Type | Description |
---|---|---|
state | object | A JSON representation of the element preceding the gap. |
defaultGap | number | The default gap for elements in this flyout. |
Returns:
number
The gap that should follow the given element.