API for folders

Hierarchy

Implements

Index

Constructors

constructor

Properties

id

id: string

name

name: string

nodeId

nodeId: string

parentId

parentId: string

sceneId

sceneId: string

sceneNodeType

sceneNodeType: TSceneNodeType

Methods

add

  • add(sceneNodeId: string): void
  • Add an item or folder to the current folder A shortcut for SceneNode.setParent()

    see

    SceneNode.setParent()

    Parameters

    • sceneNodeId: string

    Returns void

addToSelection

  • addToSelection(): void

deselect

  • deselect(): void

detachParent

  • detachParent(): void

getFolders

getItemIndex

  • getItemIndex(): number
  • Returns the item index in the list of all nodes. itemIndex defines the draw order of the node itemIndex for a SceneFolder is the itemIndex of the previous SceneItem

    To change itemIndex use placeBefore and placeAfter methods

    nodeInd | itemInd | nodes tree
     0      |    0    | Folder1
     1      |    0    |   |_Folder2
     2      |    0    |   |_ Item1
     3      |    1    |   \_ Item2
     4      |    2    | Item3
     5      |    2    | Folder3
     6      |    3    |   |_Item4
     7      |    4    |   \_Item5
     

    Returns number

getItems

getModel

getNestedNodes

getNextItem

getNextNode

getNodeIndex

  • getNodeIndex(): number

getNodes

getParent

getPath

  • getPath(): string[]

getPrevItem

getPrevNode

getScene

getSelection

hasParent

  • hasParent(): boolean

isFolder

  • isFolder(): this

isItem

  • isItem(): this

isSelected

  • isSelected(): boolean

placeAfter

  • placeAfter(nodeId: string): void

placeBefore

  • placeBefore(nodeId: string): void

remove

  • remove(): void
  • Removes the node. For folders, all nested folders and items also will be removed. To remove a folder without removing the nested nodes, use the SceneItemFolder.ungroup() method

    see

    SceneItemFolder.ungroup()

    Returns void

select

  • select(): void

setName

  • setName(newName: string): void

setParent

  • setParent(parentId: string): void

ungroup

  • ungroup(): void