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

Constructor Modifiers Description
(constructor)(renderer, block) Constructs a new instance of the RenderInfo class

Properties

Property Modifiers Type Description
bottomRow BottomRow
constants_ ConstantProvider
hasStatementInput boolean
isInline boolean
isMultiRow boolean
renderer_ Renderer
rightSide RightConnectionShape | null
topRow TopRow

Methods

Method Modifiers Description
addAlignmentPadding_(row, missingSpace)
addInput_(input, activeRow)
adjustXPosition_() protected Adjust 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_() protected Finalize 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_() protected Finalize 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_() protected Finalize 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) protected Calculate 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)