blockly > blockRendering > TopRow
blockRendering.TopRow class
An object containing information about what elements are in the top row of a block as well as sizing information for the top row. Elements in a top row can consist of corners, hats, spacers, and previous connections. After this constructor is called, the row will contain all non-spacer elements it needs.
Signature:
export declare class TopRow extends Row
Extends: Row
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(constants) | Constructs a new instance of the TopRow class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
ascenderHeight | number | How much the row extends up above its capline. | |
capline | number | The starting point for drawing the row, in the y direction. This allows us to draw hats and similar shapes that don't start at the origin. Must be non-negative (see #2820). | |
connection | PreviousConnection | null | The previous connection on the block, if any. | |
hasPreviousConnection | boolean | Whether the block has a previous connection. |
Methods
Method | Modifiers | Description |
---|---|---|
endsWithElemSpacer() | ||
hasLeftSquareCorner(block) | Returns whether or not the top row has a left square corner. | |
hasRightSquareCorner(_block) | Returns whether or not the top row has a right square corner. | |
measure() | ||
startsWithElemSpacer() |