Skip to main content

Class: BottomRow

Defined in: packages/blockly/core/renderers/zelos/measurables/bottom_row.ts:19

An object containing information about what elements are in the bottom row of a block as well as spacing information for the top row. Elements in a bottom row can consist of corners, spacers and next connections.

Extends

Properties index

PropertyDescription
hasNextConnectionWhether this row has a next connection.
connectionThe next connection on the row, if any.
descenderHeightThe amount that the bottom of the block extends below the horizontal edge, e.g. because of a next connection. Must be non-negative (see #2820).
baselineThe Y position of the bottom edge of the block, relative to the origin of the block rendering.
type-
elementsAn array of elements contained in this row.
heightThe height of the row.
widthThe width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.
minHeightThe minimum height of the row.
minWidthThe minimum width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline.
widthWithConnectedBlocksThe width of the row, from the left edge of the block to the edge of the block or any connected child blocks.
yPosThe Y position of the row relative to the origin of the block's svg group.
xPosThe X position of the row relative to the origin of the block's svg group.
hasExternalInputWhether the row has any external inputs.
hasStatementWhether the row has any statement inputs.
statementEdgeWhere 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.
hasInlineInputWhether the row has any inline inputs.
hasDummyInputWhether the row has any dummy inputs or end-row inputs.
hasJaggedEdgeWhether the row has a jagged edge.
notchOffset-
alignAlignment of the row.
constants_-

Methods index

MethodDescription
measureInspect all subcomponents and populate all size properties on the row.
startsWithElemSpacerDetermines whether this row should start with an element spacer.
getLastInputGet the last input on this row, if it has one.
getFirstSpacerConvenience method to get the first spacer element on this row.
getLastSpacerConvenience method to get the last spacer element on this row.
endsWithElemSpacerDetermines whether this row should end with an element spacer.
hasLeftSquareCornerRender a round corner unless the block has an output connection.
hasRightSquareCornerRender a round corner unless the block has an output connection.

Constructors

Constructor

new BottomRow(constants): BottomRow;

Defined in: packages/blockly/core/renderers/zelos/measurables/bottom_row.ts:23

Parameters

ParameterTypeDescription
constantsConstantProviderThe rendering constants provider.

Returns

BottomRow

Overrides

BottomRow.constructor

Properties

hasNextConnection

hasNextConnection: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:25

Whether this row has a next connection.

Inherited from

BottomRow.hasNextConnection


connection

connection:
| NextConnection
| null = null;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:30

The next connection on the row, if any.

Inherited from

BottomRow.connection


descenderHeight

descenderHeight: number = 0;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:37

The amount that the bottom of the block extends below the horizontal edge, e.g. because of a next connection. Must be non-negative (see #2820).

Inherited from

BottomRow.descenderHeight


baseline

baseline: number = 0;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:43

The Y position of the bottom edge of the block, relative to the origin of the block rendering.

Inherited from

BottomRow.baseline


type

type: number;

Defined in: packages/blockly/core/renderers/measurables/row.ts:20

Inherited from

BottomRow.type


elements

elements: Measurable[] = [];

Defined in: packages/blockly/core/renderers/measurables/row.ts:25

An array of elements contained in this row.

Inherited from

BottomRow.elements


height

height: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:30

The height of the row.

Inherited from

BottomRow.height


width

width: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:36

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

Inherited from

BottomRow.width


minHeight

minHeight: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:41

The minimum height of the row.

Inherited from

BottomRow.minHeight


minWidth

minWidth: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:47

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.

Inherited from

BottomRow.minWidth


widthWithConnectedBlocks

widthWithConnectedBlocks: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:53

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

Inherited from

BottomRow.widthWithConnectedBlocks


yPos

yPos: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:59

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

Inherited from

BottomRow.yPos


xPos

xPos: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:65

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

Inherited from

BottomRow.xPos


hasExternalInput

hasExternalInput: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/row.ts:70

Whether the row has any external inputs.

Inherited from

BottomRow.hasExternalInput


hasStatement

hasStatement: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/row.ts:75

Whether the row has any statement inputs.

Inherited from

BottomRow.hasStatement


statementEdge

statementEdge: number = 0;

Defined in: packages/blockly/core/renderers/measurables/row.ts:82

Where 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.

Inherited from

BottomRow.statementEdge


hasInlineInput

hasInlineInput: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/row.ts:87

Whether the row has any inline inputs.

Inherited from

BottomRow.hasInlineInput


hasDummyInput

hasDummyInput: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/row.ts:92

Whether the row has any dummy inputs or end-row inputs.

Inherited from

BottomRow.hasDummyInput


hasJaggedEdge

hasJaggedEdge: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/row.ts:97

Whether the row has a jagged edge.

Inherited from

BottomRow.hasJaggedEdge


notchOffset

notchOffset: number;

Defined in: packages/blockly/core/renderers/measurables/row.ts:98

Inherited from

BottomRow.notchOffset


align

align: number | null = null;

Defined in: packages/blockly/core/renderers/measurables/row.ts:103

Alignment of the row.

Inherited from

BottomRow.align


constants_

protected readonly constants_: ConstantProvider;

Defined in: packages/blockly/core/renderers/measurables/row.ts:105

Inherited from

BottomRow.constants_

Methods

measure()

measure(): void;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:73

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

Returns

void

Inherited from

BottomRow.measure


startsWithElemSpacer()

startsWithElemSpacer(): boolean;

Defined in: packages/blockly/core/renderers/measurables/bottom_row.ts:96

Determines whether this row should start with an element spacer.

Returns

boolean

Whether the row should start with a spacer.

Inherited from

BottomRow.startsWithElemSpacer


getLastInput()

getLastInput():
| InputConnection
| null;

Defined in: packages/blockly/core/renderers/measurables/row.ts:125

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

Returns

| InputConnection | null

The last input on the row, or null.

Inherited from

BottomRow.getLastInput


getFirstSpacer()

getFirstSpacer(): InRowSpacer | null;

Defined in: packages/blockly/core/renderers/measurables/row.ts:166

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

Returns

InRowSpacer | null

The first spacer element on this row.

Inherited from

BottomRow.getFirstSpacer


getLastSpacer()

getLastSpacer(): InRowSpacer | null;

Defined in: packages/blockly/core/renderers/measurables/row.ts:181

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

Returns

InRowSpacer | null

The last spacer element on this row.

Inherited from

BottomRow.getLastSpacer


endsWithElemSpacer()

endsWithElemSpacer(): boolean;

Defined in: packages/blockly/core/renderers/zelos/measurables/bottom_row.ts:27

Determines whether this row should end with an element spacer.

Returns

boolean

Whether the row should end with a spacer.

Overrides

BottomRow.endsWithElemSpacer


hasLeftSquareCorner()

hasLeftSquareCorner(block): boolean;

Defined in: packages/blockly/core/renderers/zelos/measurables/bottom_row.ts:32

Render a round corner unless the block has an output connection.

Parameters

ParameterType
blockBlockSvg

Returns

boolean

Overrides

BottomRow.hasLeftSquareCorner


hasRightSquareCorner()

hasRightSquareCorner(block): boolean;

Defined in: packages/blockly/core/renderers/zelos/measurables/bottom_row.ts:37

Render a round corner unless the block has an output connection.

Parameters

ParameterType
blockBlockSvg

Returns

boolean

Overrides

BottomRow.hasRightSquareCorner