BranchJS

interface BranchJS

JS-API for IBranch. Can be used to read and write model data.

The full version data of an ModelClientV2 is not exposed because most parts model API are not exposed to JS yet. See https://issues.modelix.org/issue/MODELIX-962

Properties

Link copied to clipboard
abstract val rootNode: INodeJS

Get root in the branch. The root node can be used to read and write model data.

Functions

Link copied to clipboard
abstract fun addListener(handler: ChangeHandler)

Add a change handler to the branch. The change handler will be called when data on the branch changes.

Link copied to clipboard
abstract fun removeListener(handler: ChangeHandler)

Remove a change handler from the branch.

Link copied to clipboard
abstract fun resolveNode(reference: INodeReferenceJS): INodeJS?

Find the node for the given reference in the branch. Returns null if the node cannot be found.