blockly > blockRendering > IPathObject

blockRendering.IPathObject interface

An interface for a block's path object.

Signature:

export interface IPathObject 

Properties

Property Modifiers Type Description
constants ConstantProvider The renderer's constant provider.
style BlockStyle The primary path of the block.
svgPath SVGElement The primary path of the block.

Methods

Method Description
addConnectionHighlight(connection, connectionPath, offset, rtl)? (Optional) Adds the given path as a connection highlight for the given connection.
applyColour(block)? (Optional) Apply the stored colours to the block's path, taking into account whether the paths belong to a shadow block.
flipRTL() Flip the SVG paths in RTL.
removeConnectionHighlight(connection)? (Optional) Removes any highlight associated with the given connection, if it exists.
setPath(pathString) Set the path generated by the renderer onto the respective SVG element.
setStyle(blockStyle)? (Optional) Update the style.
updateDraggingDelete(enabled) Add or remove styling showing that a block is dragged over a delete area.
updateHighlighted(highlighted) Set whether the block shows a highlight or not. Block highlighting is often used to visually mark blocks currently being executed.
updateInsertionMarker(enabled) Add or remove styling showing that a block is an insertion marker.
updateMovable(enabled) Add or remove styling showing that a block is movable.
updateSelected(enabled) Add or remove styling showing that a block is selected.