Skip to main content
Version: Next

Class: NodeIdNodeCollection

Collection that holds a set of nodes including children identified by nodeIds. Note that this involves remapping IDs to "tree indices" and subtree sized used by Reveal using the CDF API. Its often better to use one of the other node collections or

See

whenever possible for best performance.

Extends

Constructors

new NodeIdNodeCollection()

new NodeIdNodeCollection(client, model): NodeIdNodeCollection

Parameters

client: CogniteClient

model: CdfModelNodeCollectionDataProvider

Returns

NodeIdNodeCollection

Overrides

CdfNodeCollectionBase.constructor

Defined in

packages/cad-styling/src/NodeIdNodeCollection.ts:25

Properties

classToken

readonly static classToken: "NodeIdNodeCollection" = 'NodeIdNodeCollection'

Defined in

packages/cad-styling/src/NodeIdNodeCollection.ts:18

Accessors

classToken

Get Signature

get classToken(): string

Returns

string

Inherited from

CdfNodeCollectionBase.classToken

Defined in

packages/cad-styling/src/NodeCollection.ts:23


isLoading

Get Signature

get isLoading(): boolean

Returns

boolean

Inherited from

CdfNodeCollectionBase.isLoading

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:25

Methods

clear()

clear(): void

Clears the node collection and interrupts any ongoing operations.

Returns

void

Inherited from

CdfNodeCollectionBase.clear

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:69


executeFilter()

executeFilter(nodeIds): Promise<void>

Populates the collection with the nodes with the IDs provided. All children of the nodes are also included in the collection.

Parameters

nodeIds: number[]

IDs of nodes to include in the collection.

Returns

Promise<void>

Promise that resolves when the collection is populated.

Defined in

packages/cad-styling/src/NodeIdNodeCollection.ts:37


getAreas()

getAreas(): AreaCollection

Returns areas surrounding the nodes in the collection. The areas are boxes in "ThreeJS coordinates". Note that not all implementations supports this.

Returns

AreaCollection

Inherited from

CdfNodeCollectionBase.getAreas

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:81


getIndexSet()

getIndexSet(): IndexSet

Returns

IndexSet

Inherited from

CdfNodeCollectionBase.getIndexSet

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:77


off()

off(event, listener): void

Parameters

event: "changed"

listener

Returns

void

Inherited from

CdfNodeCollectionBase.off

Defined in

packages/cad-styling/src/NodeCollection.ts:32


on()

on(event, listener): void

Parameters

event: "changed"

listener

Returns

void

Inherited from

CdfNodeCollectionBase.on

Defined in

packages/cad-styling/src/NodeCollection.ts:27


serialize()

serialize(): SerializedNodeCollection

Returns

SerializedNodeCollection

Overrides

CdfNodeCollectionBase.serialize

Defined in

packages/cad-styling/src/NodeIdNodeCollection.ts:58


deserialize()

static deserialize(descriptor, context): Promise<NodeIdNodeCollection>

Parameters

descriptor: SerializedNodeCollection

context: NodeCollectionSerializationContext

Returns

Promise<NodeIdNodeCollection>

Defined in

packages/cad-styling/src/NodeIdNodeCollection.ts:65