Constructor

TopRow

new TopRow(constants)

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.

Parameter

constants

Blockly.blockRendering.ConstantProvider

The rendering constants provider.

Value must not be null.

Extends
Blockly.blockRendering.TopRow

Properties

ascenderHeight

unknown

How much the row extends up above its capline.

Inherited from
Blockly.blockRendering.TopRow#ascenderHeight

capline

package

unknown

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

Inherited from
Blockly.blockRendering.TopRow#capline

connection

unknown

The previous connection on the block, if any.

Inherited from
Blockly.blockRendering.TopRow#connection

constants_

protected

unknown

The renderer's constant provider.

Inherited from
Blockly.blockRendering.Row#constants_

elements

package

unknown

An array of elements contained in this row.

Inherited from
Blockly.blockRendering.Row#elements

hasDummyInput

package

unknown

Whether the row has any dummy inputs.

Inherited from
Blockly.blockRendering.Row#hasDummyInput

hasExternalInput

package

unknown

Whether the row has any external inputs.

Inherited from
Blockly.blockRendering.Row#hasExternalInput

hasInlineInput

package

unknown

Whether the row has any inline inputs.

Inherited from
Blockly.blockRendering.Row#hasInlineInput

hasJaggedEdge

package

unknown

Whether the row has a jagged edge.

Inherited from
Blockly.blockRendering.Row#hasJaggedEdge

hasPreviousConnection

package

unknown

Whether the block has a previous connection.

Inherited from
Blockly.blockRendering.TopRow#hasPreviousConnection

hasStatement

package

unknown

Whether the row has any statement inputs.

Inherited from
Blockly.blockRendering.Row#hasStatement

height

package

unknown

The height of the row.

Inherited from
Blockly.blockRendering.Row#height

minHeight

package

unknown

The minimum height of the row.

Inherited from
Blockly.blockRendering.Row#minHeight

minWidth

package

unknown

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
Blockly.blockRendering.Row#minWidth

type

package

unknown

The type of this rendering object.

Inherited from
Blockly.blockRendering.Row#type

width

package

unknown

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
Blockly.blockRendering.Row#width

widthWithConnectedBlocks

package

unknown

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
Blockly.blockRendering.Row#widthWithConnectedBlocks

xPos

package

unknown

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

Inherited from
Blockly.blockRendering.Row#xPos

yPos

package

unknown

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

Inherited from
Blockly.blockRendering.Row#yPos

Methods

endsWithElemSpacer

package

endsWithElemSpacer() returns boolean

Determines whether this row should end with an element spacer.

Inherited from
Blockly.blockRendering.Row#endsWithElemSpacer
Returns

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.

Inherited from
Blockly.blockRendering.Row#getFirstSpacer
Returns

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.

Inherited from
Blockly.blockRendering.Row#getLastInput
Returns

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.

Inherited from
Blockly.blockRendering.Row#getLastSpacer
Returns

The last spacer element on this row.

hasLeftSquareCorner

hasLeftSquareCorner(block) returns boolean

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

Parameter

block

The block whose top row this represents.

Value must not be null.

Inherited from
Blockly.zelos.TopRow#hasLeftSquareCorner
Returns

Whether or not the top row has a left square corner.

hasRightSquareCorner

hasRightSquareCorner(block) returns boolean

Returns whether or not the top row has a right square corner.

Parameter

block

Blockly.BlockSvg

The block whose top row this represents.

Value must not be null.

Returns

boolean Whether or not the top row has a left square corner.