Skip to main content

blockly > Marker

Marker class

Class for a marker. This is used in keyboard navigation to save a location in the Blockly AST.

Signature:

export declare class Marker 

Properties

Property

Modifiers

Type

Description

colour

string | null

The colour of the marker.

curNode

protected

IFocusableNode | null

The current location of the marker.

type

string

The type of the marker.

Methods

Method

Modifiers

Description

dispose()

Dispose of this marker.

getCurNode()

Gets the current location of the marker.

getSourceBlock()

Returns the block that this marker's current node is a child of.

getSourceBlockFromNode(node)

Returns the block that the given node is a child of.

setCurNode(newNode)

Set the location of the marker and call the update method.