Stay organized with collections
Save and categorize content based on your preferences.
blockly > Cursor
Cursor class
Class for a cursor. A cursor controls how a user navigates the Blockly AST.
Signature:
export declare class Cursor extends Marker
Extends: Marker
Constructors
Constructor |
Modifiers |
Description |
(constructor)() |
|
Constructs a new instance of the Cursor class |
Properties
Property |
Modifiers |
Type |
Description |
type |
|
string |
|
Methods
Method |
Modifiers |
Description |
in() |
|
Find the in connection or field. |
next() |
|
Find the next connection, field, or block. |
out() |
|
Find the out connection, field, or block. |
prev() |
|
Find the previous connection, field, or block. |
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["The `Cursor` class in Blockly manages user navigation within the Abstract Syntax Tree (AST)."],["It provides methods for traversing connections, fields, and blocks, including `next()`, `prev()`, `in()`, and `out()`."],["Extending the `Marker` class, `Cursor` includes a `type` property and a constructor for object initialization."]]],["The `Cursor` class, extending `Marker`, manages user navigation within the Blockly Abstract Syntax Tree (AST). It is instantiated with a constructor. Key actions include traversing the AST: `in()` finds the inner connection or field, `next()` moves to the next connection, field, or block, `out()` finds the outer connection, and `prev()` moves to the previous connection, field, or block. The cursor also has a `type` property.\n"]]