Skip to main content

Home > 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

ConstructorModifiersDescription
(constructor)(gridUnit)Creates a new ConstantProvider.

Properties

PropertyModifiersTypeDescription
CURSOR_COLOURstring
CURSOR_RADIUSnumberRadius of the cursor for input and output connections.
FIELD_COLOUR_FULL_BLOCKboolean
FIELD_DROPDOWN_COLOURED_DIVboolean
FIELD_DROPDOWN_NO_BORDER_RECT_SHADOWboolean
FIELD_DROPDOWN_SVG_ARROWboolean
FIELD_TEXT_FONTFAMILYstring
FIELD_TEXT_FONTWEIGHTstring
FIELD_TEXTINPUT_BOX_SHADOWboolean
FULL_BLOCK_FIELDSboolean
GRID_UNITnumber
HEXAGONALShape | nullThe object containing information about the hexagon used for a boolean reporter block. Null before init is called.
JAGGED_TEETH_HEIGHTnumber
JAGGED_TEETH_WIDTHnumber
MAX_DYNAMIC_CONNECTION_SHAPE_WIDTHnumber
REPLACEMENT_GLOW_COLOURstringThe replacement glow colour.
REPLACEMENT_GLOW_SIZEnumberThe size of the selected glow.
replacementGlowFilterIdstringThe ID of the replacement glow filter, or the empty string if no filter is set.
ROUNDEDShape | nullThe object containing information about the hexagon used for a number or string reporter block. Null before init is called.
SELECTED_GLOW_COLOURstringThe selected glow colour.
SELECTED_GLOW_SIZEnumberThe size of the selected glow.
selectedGlowFilterIdstringThe 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; }
SQUAREDShape | nullThe object containing information about the hexagon used for a rectangular reporter block. Null before init is called.
START_HAT_HEIGHTnumber
START_HAT_WIDTHnumber
STATEMENT_INPUT_SPACER_MIN_WIDTHnumber

Methods

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