blockly > Marker > setCurNode
Marker.setCurNode() method
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.
Signature:
setCurNode(newNode: ASTNode): void;
Parameters
Parameter |
Type |
Description |
newNode |
ASTNode |
The new location of the marker. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `setCurNode` method updates the marker's location within the Blockly workspace based on the provided ASTNode."],["It triggers a visual update of the marker to reflect its new position and can optionally indicate if it's on a stack's top."],["The method accepts a single argument, `newNode`, which represents an ASTNode defining the marker's target location."]]],["The `setCurNode` method of the `Marker` class updates the marker's location. It accepts an `ASTNode` as `newNode`, which represents the marker's new position. The method also triggers an update of the marker after the location change. If `isStack` is true, the `newNode` must be at the top of an output or previous connection within a stack. This method does not return any value.\n"]]