Blockly.geras. HighlightConstantProvider
Constructor
HighlightConstantProvider
new HighlightConstantProvider(constants)
An object that provides constants for rendering highlights on blocks. Some highlights are simple offsets of the parent paths and can be generated programmatically. Others, especially on curves, are just made out of piles of constants and are hard to tweak.
Parameter |
|
---|---|
constants |
Blockly.blockRendering.ConstantProvider The rendering constants provider. Value must not be null. |
Properties
constantProvider
non-null Blockly.blockRendering.ConstantProvider
The renderer's constant provider.
INSIDE_CORNER
non-null Object
An object containing sizing and path information about inside corner highlights.
JAGGED_TEETH
non-null Object
An object containing sizing and path information about highlights for collapsed block indicators.
NOTCH
non-null Object
An object containing sizing and path information about notch highlights.
OFFSET
number
The offset between the block's main path and highlight path.
OUTSIDE_CORNER
non-null Object
An object containing sizing and path information about outside corner highlights.
PUZZLE_TAB
non-null Object
An object containing sizing and path information about puzzle tab highlights.
START_HAT
non-null Object
An object containing sizing and path information about start hat highlights.
START_POINT
string
The start point, which is offset in both X and Y, as an SVG path chunk.
Methods
init
init()
Initialize shape objects based on the constants set in the constructor.
makeInsideCorner
makeInsideCorner() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about inside corner highlights.
makeJaggedTeeth
makeJaggedTeeth() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about collapsed block edge highlights.
makeNotch
makeNotch() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about notch highlights.
makeOutsideCorner
makeOutsideCorner() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about outside corner highlights.
makePuzzleTab
makePuzzleTab() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about puzzle tab highlights.
makeStartHat
makeStartHat() returns Object
- Returns
-
non-null Object
An object containing sizing and path information about start highlights.