Skip to main content

Class: SpacerRow

Defined in: packages/blockly/core/renderers/measurables/spacer_row.ts:17

An object containing information about a spacer between two rows.

Extends​

Properties index​

PropertyDescription
type-
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.
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_-
followsStatement-
precedesStatement-
widthWithConnectedBlocksThe width of the row, from the left edge of the block to the edge of the block or any connected child blocks.
elementsAn array of elements contained in this row.
heightThe height of the spacer.
widthThe width of the spacer.

Methods index​

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

Constructors​

Constructor​

new SpacerRow(
constants,
height,
width
): SpacerRow;

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

Parameters​

ParameterTypeDescription
constantsConstantProviderThe rendering constants provider.
heightnumberThe height of the spacer.
widthnumberThe width of the spacer.

Returns​

SpacerRow

Overrides​

Row.constructor

Properties​

type​

type: number;

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

Inherited from​

Row.type


minHeight​

minHeight: number = 0;

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

The minimum height of the row.

Inherited from​

Row.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​

Row.minWidth


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​

Row.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​

Row.xPos


hasExternalInput​

hasExternalInput: boolean = false;

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

Whether the row has any external inputs.

Inherited from​

Row.hasExternalInput


hasStatement​

hasStatement: boolean = false;

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

Whether the row has any statement inputs.

Inherited from​

Row.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​

Row.statementEdge


hasInlineInput​

hasInlineInput: boolean = false;

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

Whether the row has any inline inputs.

Inherited from​

Row.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​

Row.hasDummyInput


hasJaggedEdge​

hasJaggedEdge: boolean = false;

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

Whether the row has a jagged edge.

Inherited from​

Row.hasJaggedEdge


notchOffset​

notchOffset: number;

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

Inherited from​

Row.notchOffset


align​

align: number | null = null;

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

Alignment of the row.

Inherited from​

Row.align


constants_​

protected readonly constants_: ConstantProvider;

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

Inherited from​

Row.constants_


followsStatement​

followsStatement: boolean = false;

Defined in: packages/blockly/core/renderers/measurables/spacer_row.ts:18


precedesStatement​

precedesStatement: boolean = false;

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


widthWithConnectedBlocks​

widthWithConnectedBlocks: number = 0;

Defined in: packages/blockly/core/renderers/measurables/spacer_row.ts:22

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

Overrides​

Row.widthWithConnectedBlocks


elements​

elements: InRowSpacer[];

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

An array of elements contained in this row.

Overrides​

Row.elements


height​

height: number;

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

The height of the spacer.

Inherited from​

Row.height


width​

width: number;

Defined in: packages/blockly/core/renderers/measurables/spacer_row.ts:33

The width of the spacer.

Inherited from​

Row.width

Methods​

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​

Row.getLastInput


startsWithElemSpacer()​

startsWithElemSpacer(): boolean;

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

Determines whether this row should start with an element spacer.

Returns​

boolean

Whether the row should start with a spacer.

Inherited from​

Row.startsWithElemSpacer


endsWithElemSpacer()​

endsWithElemSpacer(): boolean;

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

Determines whether this row should end with an element spacer.

Returns​

boolean

Whether the row should end with a spacer.

Inherited from​

Row.endsWithElemSpacer


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​

Row.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​

Row.getLastSpacer


measure()​

measure(): void;

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

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

Returns​

void

Overrides​

Row.measure