Interface ISceneNodeApi

API for scene items and folders

Hierarchy

Index

Properties

Optional childrenIds

childrenIds: string[]

id

id: string

Optional parentId

parentId: string

sceneId

sceneId: string

sceneNodeType

sceneNodeType: TSceneNodeType

Methods

addToSelection

  • addToSelection(): void

deselect

  • deselect(): void

detachParent

  • detachParent(): void
  • After detaching the parent the current node will be a first-level-nesting node

    Returns void

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

getNextItem

getNextNode

getNextSiblingNode

getNodeIndex

  • getNodeIndex(): number
  • Returns the node index in the list of all nodes To change node index use placeBefore and placeAfter methods

    Returns number

getParent

getPath

  • getPath(): string[]

getPrevItem

getPrevNode

getPrevSiblingNode

getScene

getSelection

  • For a source folder, returns an ISelection with the all items and folders in the folder For a scene item, returns an ISelection with only one item

    Returns ISelection

hasParent

  • hasParent(): void

isFolder

  • isFolder(): boolean

isItem

  • isItem(): boolean

isSelected

  • isSelected(): boolean

placeAfter

  • placeAfter(nodeId: string): void
  • Place the current node after provided node This method can change the parent of current node

    Parameters

    • nodeId: string

    Returns void

placeBefore

  • placeBefore(nodeId: string): void
  • Place the current node before provided node This method can change the parent of current node

    Parameters

    • nodeId: string

    Returns 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 ISceneItemFolderApi.ungroup() method

    see

    ISceneItemFolderApi.ungroup()

    Returns void

select

  • select(): void

setParent

  • setParent(parentId: string): void