Skip to main content

Home > blockly > blockRendering > Row

blockRendering.Row class

An object representing a single row on a rendered block and all of its subcomponents.

Signature:

export declare class Row 

Constructors

ConstructorModifiersDescription
(constructor)(constants)Constructs a new instance of the Row class

Properties

PropertyModifiersTypeDescription
alignnumber | nullAlignment of the row.
constants_protected readonlyConstantProvider
elementsMeasurable[]An array of elements contained in this row.
hasDummyInputbooleanWhether the row has any dummy inputs or end-row inputs.
hasExternalInputbooleanWhether the row has any external inputs.
hasInlineInputbooleanWhether the row has any inline inputs.
hasJaggedEdgebooleanWhether the row has a jagged edge.
hasStatementbooleanWhether the row has any statement inputs.
heightnumberThe height of the row.
minHeightnumberThe minimum height of the row.
minWidthnumberThe minimum width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.
notchOffsetnumber
statementEdgenumberWhere the left edge of all of the statement inputs on the block should be. This makes sure that statement inputs which are proceded by fields of varius widths are all aligned.
typenumber
widthnumberThe width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.
widthWithConnectedBlocksnumberThe width of the row, from the left edge of the block to the edge of the block or any connected child blocks.
xPosnumberThe X position of the row relative to the origin of the block's svg group.
yPosnumberThe Y position of the row relative to the origin of the block's svg group.

Methods

MethodModifiersDescription
endsWithElemSpacer()Determines whether this row should end with an element spacer.
getFirstSpacer()Convenience method to get the first spacer element on this row.
getLastInput()Get the last input on this row, if it has one.
getLastSpacer()Convenience method to get the last spacer element on this row.
measure()Inspect all subcomponents and populate all size properties on the row.
startsWithElemSpacer()Determines whether this row should start with an element spacer.