Skip to main content

Home > blockly > zelos > RenderInfo

zelos.RenderInfo class

An object containing all sizing information needed to draw this block.

This measure pass does not propagate changes to the block (although fields may choose to rerender when getSize() is called). However, calling it repeatedly may be expensive.

Signature:

export declare class RenderInfo extends BaseRenderInfo 

Extends: BaseRenderInfo

Constructors

ConstructorModifiersDescription
(constructor)(renderer, block)Constructs a new instance of the RenderInfo class

Properties

PropertyModifiersTypeDescription
bottomRowBottomRow
constants_ConstantProvider
hasStatementInputboolean
isInlineboolean
isMultiRowboolean
renderer_Renderer
rightSideRightConnectionShape | null
topRowTopRow

Methods

MethodModifiersDescription
addAlignmentPadding_(row, missingSpace)
addInput_(input, activeRow)
adjustXPosition_()protectedAdjust the x position of fields to bump all non-label fields in the first row past the notch position. This must be called before computeBounds is called.
finalize_()
finalizeHorizontalAlignment_()protectedFinalize horizontal alignment of elements on the block. In particular, reduce the implicit spacing created by the left and right output connection shapes by adding setting negative spacing onto the leftmost and rightmost spacers.
finalizeOutputConnection_()protectedFinalize the output connection info. In particular, set the height of the output connection to match that of the block. For the right side, add a right connection shape element and have it match the dimensions of the output connection.
finalizeVerticalAlignment_()protectedFinalize vertical alignment of rows on a block. In particular, reduce the implicit spacing when a non-shadow block is connected to any of an input row's inline inputs.
getDesiredRowWidth_(row)
getElemCenterline_(row, elem)
getInRowSpacing_(prev, next)
getNegativeSpacing_(elem)protectedCalculate the spacing to reduce the left and right edges by based on the outer and inner connection shape.
getRenderer()Get the block renderer in use.
getSpacerRowHeight_(prev, next)
getSpacerRowWidth_(prev, next)
measure()
shouldStartNewRow_(currInput, prevInput)