Constructor

Row

new Row(constants)

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

Parameter

constants

Blockly.blockRendering.ConstantProvider

The rendering constants provider.

Value must not be null.

Properties

constants_

protected

non-null Blockly.blockRendering.ConstantProvider

The renderer's constant provider.

elements

package

non-null Array of non-null Blockly.blockRendering.Measurable

An array of elements contained in this row.

hasDummyInput

package

boolean

Whether the row has any dummy inputs.

hasExternalInput

package

boolean

Whether the row has any external inputs.

hasInlineInput

package

boolean

Whether the row has any inline inputs.

hasJaggedEdge

package

boolean

Whether the row has a jagged edge.

hasStatement

package

boolean

Whether the row has any statement inputs.

height

package

number

The height of the row.

minHeight

package

number

The minimum height of the row.

minWidth

package

number

The minimum width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.

type

package

number

The type of this rendering object.

width

package

number

The width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.

widthWithConnectedBlocks

package

number

The width of the row, from the left edge of the block to the edge of the block or any connected child blocks.

xPos

package

number

The X position of the row relative to the origin of the block's svg group.

yPos

package

number

The Y position of the row relative to the origin of the block's svg group.

Methods

endsWithElemSpacer

package

endsWithElemSpacer() returns boolean

Determines whether this row should end with an element spacer.

Returns

boolean Whether the row should end with a spacer.

getFirstSpacer

package

getFirstSpacer() returns Blockly.blockRendering.InRowSpacer

Convenience method to get the first spacer element on this row.

Returns

Blockly.blockRendering.InRowSpacer The first spacer element on this row.

getLastInput

package

getLastInput() returns Blockly.blockRendering.InputConnection

Get the last input on this row, if it has one.

Returns

Blockly.blockRendering.InputConnection The last input on the row, or null.

getLastSpacer

package

getLastSpacer() returns Blockly.blockRendering.InRowSpacer

Convenience method to get the last spacer element on this row.

Returns

Blockly.blockRendering.InRowSpacer The last spacer element on this row.

measure

package

measure()

Inspect all subcomponents and populate all size properties on the row.

startsWithElemSpacer

package

startsWithElemSpacer() returns boolean

Determines whether this row should start with an element spacer.

Returns

boolean Whether the row should start with a spacer.