Skip to main content

Home > blockly > blockRendering > IPathObject

blockRendering.IPathObject interface

An interface for a block's path object.

Signature:

export interface IPathObject 

Properties

PropertyModifiersTypeDescription
constantsConstantProviderThe renderer's constant provider.
styleBlockStyleThe primary path of the block.
svgPathSVGElementThe primary path of the block.

Methods

MethodDescription
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.