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.
cursorSvg SVGElement | null Holds the cursors SVG element when the cursor is attached to the block. This is null if there is no cursor on the block.
markerSvg SVGElement | null Holds the markers SVG element when the marker is attached to the block. This is null if there is no marker on the block.
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) 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.
setCursorSvg(cursorSvg) Add the cursor SVG to this block's SVG group.
setMarkerSvg(markerSvg) Add the marker SVG to this block's SVG group.
setPath(pathString) Set the path generated by the renderer onto the respective SVG element.
setStyle(blockStyle) 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.