Blockly.blockRendering. IPathObject
The interface for an object that owns a block's rendering SVG elements.
Properties
applyColour
Apply the stored colours to the block's path, taking into account whether the paths belong to a shadow block.
Parameter |
|
---|---|
block |
The source block. Value must not be null. |
constants
non-null Blockly.blockRendering.ConstantProvider
The renderer's constant provider.
cursorSvg
SVGElement
Holds the cursors SVG element when the cursor is attached to the block. This is null if there is no cursor on the block.
flipRTL
Flip the SVG paths in RTL.
markerSvg
SVGElement
Holds the markers SVG element when the marker is attached to the block. This is null if there is no marker on the block.
setCursorSvg
Add the cursor SVG to this block's SVG group.
Parameter |
|
---|---|
cursorSvg |
SVGElement The SVG root of the cursor to be added to the block SVG group. |
setMarkerSvg
Add the marker SVG to this block's SVG group.
Parameter |
|
---|---|
markerSvg |
SVGElement The SVG root of the marker to be added to the block SVG group. |
setPath
Set the path generated by the renderer onto the respective SVG element.
Parameter |
|
---|---|
pathString |
string The path. |
setStyle
Update the style.
Parameter |
|
---|---|
blockStyle |
The block style to use. Value must not be null. |
style
non-null Blockly.Theme.BlockStyle
The primary path of the block.
svgPath
non-null SVGElement
The primary path of the block.
updateDraggingDelete
Add or remove styling showing that a block is dragged over a delete area.
Parameter |
|
---|---|
enable |
boolean True if the block is being dragged over a delete area, false otherwise. |
updateHighlighted
Set whether the block shows a highlight or not. Block highlighting is often used to visually mark blocks currently being executed.
Parameter |
|
---|---|
highlighted |
boolean True if highlighted. |
updateInsertionMarker
Add or remove styling showing that a block is an insertion marker.
Parameter |
|
---|---|
enable |
boolean True if the block is an insertion marker, false otherwise. |
updateMovable
Add or remove styling showing that a block is movable.
Parameter |
|
---|---|
enable |
boolean True if the block is movable, false otherwise. |
updateReplacementFade
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.
Parameter |
|
---|---|
enable |
boolean True if styling should be added. |
updateSelected
Add or remove styling showing that a block is selected.
Parameter |
|
---|---|
enable |
boolean True if selection is enabled, false otherwise. |