Class: Row
Defined in: packages/blockly/core/renderers/measurables/row.ts:19
An object representing a single row on a rendered block and all of its subcomponents.
Extended by
Properties index
| Property | Description |
|---|---|
| type | - |
| elements | An array of elements contained in this row. |
| height | The height of the row. |
| width | The width of the row, from the left edge of the block to the right. Does not include child blocks unless they are inline. |
| minHeight | The minimum height of the row. |
| minWidth | 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. |
| widthWithConnectedBlocks | The width of the row, from the left edge of the block to the edge of the block or any connected child blocks. |
| yPos | The Y position of the row relative to the origin of the block's svg group. |
| xPos | The X position of the row relative to the origin of the block's svg group. |
| hasExternalInput | Whether the row has any external inputs. |
| hasStatement | Whether the row has any statement inputs. |
| statementEdge | 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. |
| hasInlineInput | Whether the row has any inline inputs. |
| hasDummyInput | Whether the row has any dummy inputs or end-row inputs. |
| hasJaggedEdge | Whether the row has a jagged edge. |
| notchOffset | - |
| align | Alignment of the row. |
| constants_ | - |
Methods index
| Method | Description |
|---|---|
| getLastInput | Get the last input on this row, if it has one. |
| measure | Inspect all subcomponents and populate all size properties on the row. |
| startsWithElemSpacer | Determines whether this row should start with an element spacer. |
| endsWithElemSpacer | Determines whether this row should end with an element spacer. |
| getFirstSpacer | Convenience method to get the first spacer element on this row. |
| getLastSpacer | Convenience method to get the last spacer element on this row. |
Constructors
Constructor
new Row(constants): Row;
Defined in: packages/blockly/core/renderers/measurables/row.ts:110
Parameters
| Parameter | Type | Description |
|---|---|---|
constants | ConstantProvider | The rendering constants provider. |
Returns
Row
Properties
type
type: number;
Defined in: packages/blockly/core/renderers/measurables/row.ts:20
elements
elements: Measurable[] = [];
Defined in: packages/blockly/core/renderers/measurables/row.ts:25
An array of elements contained in this row.
height
height: number = 0;
Defined in: packages/blockly/core/renderers/measurables/row.ts:30
The height of the row.
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.
minHeight
minHeight: number = 0;
Defined in: packages/blockly/core/renderers/measurables/row.ts:41
The minimum height of the row.
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.
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.
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.
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.
hasExternalInput
hasExternalInput: boolean = false;
Defined in: packages/blockly/core/renderers/measurables/row.ts:70
Whether the row has any external inputs.
hasStatement
hasStatement: boolean = false;
Defined in: packages/blockly/core/renderers/measurables/row.ts:75
Whether the row has any statement inputs.
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.
hasInlineInput
hasInlineInput: boolean = false;
Defined in: packages/blockly/core/renderers/measurables/row.ts:87
Whether the row has any inline inputs.
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.
hasJaggedEdge
hasJaggedEdge: boolean = false;
Defined in: packages/blockly/core/renderers/measurables/row.ts:97
Whether the row has a jagged edge.
notchOffset
notchOffset: number;
Defined in: packages/blockly/core/renderers/measurables/row.ts:98
align
align: number | null = null;
Defined in: packages/blockly/core/renderers/measurables/row.ts:103
Alignment of the row.
constants_
protected readonly constants_: ConstantProvider;
Defined in: packages/blockly/core/renderers/measurables/row.ts:105
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.
measure()
measure(): void;
Defined in: packages/blockly/core/renderers/measurables/row.ts:139
Inspect all subcomponents and populate all size properties on the row.
Returns
void
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.
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.
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.
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.