Blockly. Marker
Constructor
Marker
new Marker()
Class for a marker. This is used in keyboard navigation to save a location in the Blockly AST.
Properties
colour
nullable string
The colour of the marker.
type
string
The type of the marker.
Methods
dispose
dispose()
Dispose of this marker.
draw
draw()
Redraw the current marker.
getCurNode
getCurNode() returns Blockly.ASTNode
Gets the current location of the marker.
- Returns
-
Blockly.ASTNode
The current field, connection, or block the marker is on.
getDrawer
getDrawer() returns Blockly.blockRendering.MarkerSvg
Get the current drawer for the marker.
- Returns
-
Blockly.blockRendering.MarkerSvg
The object in charge of drawing the marker.
hide
hide()
Hide the marker SVG.
setCurNode
setCurNode(newNode)
Set the location of the marker and call the update method. Setting isStack to true will only work if the newLocation is the top most output or previous connection on a stack.
Parameter |
|
---|---|
newNode |
The new location of the marker. |
setDrawer
setDrawer(drawer)
Sets the object in charge of drawing the marker.
Parameter |
|
---|---|
drawer |
Blockly.blockRendering.MarkerSvg The object in charge of drawing the marker. |