blockly > zelos > ConstantProvider

zelos.ConstantProvider class

An object that provides constants for rendering blocks in Zelos mode.

Signature:

export declare class ConstantProvider extends BaseConstantProvider 

Extends: BaseConstantProvider

Constructors

Constructor Modifiers Description
(constructor)() Constructs a new instance of the ConstantProvider class

Properties

Property Modifiers Type Description
CURSOR_COLOUR string
CURSOR_RADIUS number Radius of the cursor for input and output connections.
FIELD_COLOUR_FULL_BLOCK boolean
FIELD_DROPDOWN_COLOURED_DIV boolean
FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW boolean
FIELD_DROPDOWN_SVG_ARROW boolean
FIELD_TEXT_FONTFAMILY string
FIELD_TEXT_FONTWEIGHT string
FIELD_TEXTINPUT_BOX_SHADOW boolean
FULL_BLOCK_FIELDS boolean
GRID_UNIT number
HEXAGONAL Shape | null The object containing information about the hexagon used for a boolean reporter block. Null before init is called.
JAGGED_TEETH_HEIGHT number
JAGGED_TEETH_WIDTH number
MAX_DYNAMIC_CONNECTION_SHAPE_WIDTH number
REPLACEMENT_GLOW_COLOUR string The replacement glow colour.
REPLACEMENT_GLOW_SIZE number The size of the selected glow.
replacementGlowFilterId string The ID of the replacement glow filter, or the empty string if no filter is set.
ROUNDED Shape | null The object containing information about the hexagon used for a number or string reporter block. Null before init is called.
SELECTED_GLOW_COLOUR string The selected glow colour.
SELECTED_GLOW_SIZE number The size of the selected glow.
selectedGlowFilterId string The ID of the selected glow filter, or the empty string if no filter is set.
SHAPE_IN_SHAPE_PADDING { [key: number]: { [key: number]: number; }; } Map of output/input shapes and the amount they should cause a block to be padded. Outer key is the outer shape, inner key is the inner shape. When a block with the outer shape contains an input block with the inner shape on its left or right edge, the block elements are aligned such that the padding specified is reached.
SHAPES { HEXAGONAL: number; ROUND: number; SQUARE: number; PUZZLE: number; NOTCH: number; }
SQUARED Shape | null The object containing information about the hexagon used for a rectangular reporter block. Null before init is called.
START_HAT_HEIGHT number
START_HAT_WIDTH number
STATEMENT_INPUT_SPACER_MIN_WIDTH number

Methods

Method Modifiers Description
createDom(svg, tagName, selector)
dispose()
generateSecondaryColour_(colour)
generateTertiaryColour_(colour)
getCSS_(selector)
init()
makeHexagonal() protected Create sizing and path information about a hexagonal shape.
makeInsideCorners()
makeNotch()
makeRounded() protected Create sizing and path information about a rounded shape.
makeSquared() protected Create sizing and path information about a squared shape.
makeStartHat()
setDynamicProperties_(theme)
setFontConstants_(theme)
shapeFor(connection)