blockly > blockRendering > PathObject
blockRendering.PathObject class
An object that handles creating and setting each of the SVG elements used by the renderer.
Signature:
export declare class PathObject implements IPathObject
Implements: IPathObject
Constructors
Constructor | Modifiers | Description |
|---|---|---|
Constructs a new instance of the |
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
BlockStyle | |||
SVGElement | |||
SVGElement |
Methods
Method | Modifiers | Description |
|---|---|---|
addConnectionHighlight(connection, connectionPath, offset, rtl) | Adds the given path as a connection highlight for the given connection. | |
Apply the stored colours to the block's path, taking into account whether the paths belong to a shadow block. | ||
Flip the SVG paths in RTL. | ||
Removes any highlight associated with the given connection, if it exists. | ||
| Add or remove the given CSS class on the path object's root SVG element. | |
Set the path generated by the renderer onto the respective SVG element. | ||
Set the style. | ||
| Updates the look of the block to reflect a disabled state. | |
Add or remove styling showing that a block is dragged over a delete area. | ||
Set whether the block shows a highlight or not. Block highlighting is often used to visually mark blocks currently being executed. | ||
Add or remove styling showing that a block is an insertion marker. | ||
Add or remove styling showing that a block is movable. | ||
Add or remove styling that shows that if the dragging block is dropped, this block will be replaced. If a shadow block, it will disappear. Otherwise it will bump. | ||
Add or remove styling showing that a block is selected. | ||
| Updates the look of the block to reflect a shadow state. | |
Add or remove styling that shows that if the dragging block is dropped, this block will be connected to the input. |