Blockly. TabNavigateCursor
Constructor
TabNavigateCursor
new TabNavigateCursor()
A cursor for navigating between tab navigable fields.
- Extends
- Blockly.BasicCursor
Property
colour
unknown
The colour of the marker.
- Inherited from
- Blockly.Marker#colour
Methods
dispose
dispose()
Dispose of this marker.
- Inherited from
- Blockly.Marker#dispose
draw
draw()
Redraw the current marker.
- Inherited from
- Blockly.Marker#draw
getCurNode
getCurNode() returns Blockly.ASTNode
Gets the current location of the marker.
- Inherited from
- Blockly.Marker#getCurNode
- Returns
-
The current field, connection, or block the marker is on.
getDrawer
getDrawer() returns Blockly.blockRendering.MarkerSvg
Get the current drawer for the marker.
- Inherited from
- Blockly.Marker#getDrawer
- Returns
-
The object in charge of drawing the marker.
getNextNode_
getNextNode_(node, isValid) returns Blockly.ASTNode
Uses pre order traversal to navigate the Blockly AST. This will allow a user to easily navigate the entire Blockly AST without having to go in and out levels on the tree.
Parameter |
|
---|---|
node |
The current position in the AST. |
isValid |
A function true/false depending on whether the given node should be traversed. Value must not be null. |
- Inherited from
- Blockly.BasicCursor#getNextNode_
- Returns
-
The next node in the traversal.
getPreviousNode_
getPreviousNode_(node, isValid) returns Blockly.ASTNode
Reverses the pre order traversal in order to find the previous node. This will allow a user to easily navigate the entire Blockly AST without having to go in and out levels on the tree.
Parameter |
|
---|---|
node |
The current position in the AST. |
isValid |
A function true/false depending on whether the given node should be traversed. Value must not be null. |
- Inherited from
- Blockly.BasicCursor#getPreviousNode_
- Returns
-
The previous node in the traversal or null if no previous node exists.
hide
hide()
Hide the marker SVG.
- Inherited from
- Blockly.Marker#hide
onBlocklyAction
onBlocklyAction(action) returns boolean
Handles the given action. This is only triggered when keyboard navigation is enabled.
Parameter |
|
---|---|
action |
The action to be handled. Value must not be null. |
- Inherited from
- Blockly.Cursor#onBlocklyAction
- Implements
- Blockly.IBlocklyActionable#onBlocklyAction
- Returns
-
True if the action has been handled, false otherwise.
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. |
- Inherited from
- Blockly.Marker#setCurNode
setDrawer
setDrawer(drawer)
Sets the object in charge of drawing the marker.
Parameter |
|
---|---|
drawer |
The object in charge of drawing the marker. |
- Inherited from
- Blockly.Marker#setDrawer
validNode_
validNode_(node) returns boolean
Skip all nodes except for tab navigable fields.
Parameter |
|
---|---|
node |
The AST node to check whether it is valid. |
- Inherited from
- Blockly.TabNavigateCursor#validNode_
- Returns
-
True if the node should be visited, false otherwise.