Skip to main content

Home > blockly > geras > Highlighter

geras.Highlighter class

An object that adds highlights to a block based on the given rendering information.

Highlighting is interesting because the highlights do not fully enclose the block. Instead, they are positioned based on a light source in the top left. This means that rendering highlights requires exact information about the position of each part of the block. The resulting paths are not continuous or closed paths. The highlights for tabs and notches are loosely based on tab and notch shapes, but are not exactly the same.

Signature:

export declare class Highlighter 

Constructors

ConstructorModifiersDescription
(constructor)(info)Constructs a new instance of the Highlighter class

Properties

PropertyModifiersTypeDescription
constants_ConstantProvider
highlightConstants_HighlightConstantProvider
info_RenderInfo
inlineSteps_string
insideCornerPaths_InsideCorner
jaggedTeethPaths_JaggedTeeth
notchPaths_Notch
outsideCornerPaths_OutsideCorner
puzzleTabPaths_PuzzleTab
RTL_boolean
startPaths_StartHat
steps_string

Methods

MethodModifiersDescription
drawBottomRow(row)Add a highlight to the bottom row.
drawInlineInput(input)Add a highlight to an inline input.
drawJaggedEdge_(row)Add a highlight on a jagged edge for a collapsed block.
drawLeft()Draw the highlight on the left side of the block.
drawRightSideRow(row)Add a highlight on the right side of a row.
drawStatementInput(row)Add a highlight on a statement input.
drawTopCorner(row)Add a highlight to the top corner of a block.
drawValueInput(row)Add a highlight on a value input.
getPath()Get the steps for the highlight path.