An HTMl tree view that navigates the !DataObject | DataObjects in the given !Data | Data, while controlling the visibility of their corresponding ViewObjects in the given View.

See ui/treeview | @xeokit/sdk/treeview for usage.

Constructors

Properties

Accessors

Methods

Constructors

Properties

_autoAddModels: boolean
_autoExpandDepth: number
_checkboxChangeHandler: (event: Event) => void
_containerElement: HTMLElement
_dataModels: { [key: string]: DataModel }
_destroyed: boolean
_groupTypes: string[]
_hierarchy: number
_linkType: string
_muteSceneEvents: boolean
_muteTreeEvents: boolean
_objectNodes: { [key: string]: TreeViewNode }
_ownsContainerElement: boolean
_pruneEmptyNodes: boolean
_rootElement: HTMLUListElement
_rootName: any
_rootNodes: TreeViewNode[]
_showListItemElementId: string
_sortNodes: boolean
_spatialSortFunc: (node1: TreeViewNode, node2: TreeViewNode) => number
_switchCollapseHandler: (event: MouseEvent) => void
_switchExpandHandler: (event: MouseEvent) => void
_viewer: Viewer
data: Data

The semantic !Data | Data model that determines the structure of this TreeView.

events: TreeViewEvents

The events emitted by this TreeView.

view: View

The View that contains the ViewObjects navigated by this TreeView.

AggregationHierarchy: number = 0

Hierarchy mode that arranges the TreeViewNodes as an aggregation hierarchy.

The mode creates a TreeViewNode hierarchy that mirrors that of the !DataObject | DataObjects and aggregation !Relationship | Relationships in the !Data | Data.

In this hierarchy, each TreeViewNode corresponds to a DataObject in the Data. The TreeViewNodes are connected into a hierarchy that reflects a depth-first traversal from the root DataObjects that follows each DataObject's outgoing Relationships of the type given in TreeView.linkType.

GroupsHierarchy: number = 2

Hierarchy mode that arranges the TreeViewNodes into an n-level grouped hierarchy.

This mode creates a multi-level grouped hierarchy, following the order given in TreeViewParams.groupTypes. The TreeViewNodes at level 0 are all the same type as TreeViewParams.groupTypes[0], TreeViewNodes at level 1 are all the same type as TreeViewParams.groupTypes[1], and so on. Once descended beyond the length of TreeViewParams.groupTypes, the TreeViewNodes are grouped by type.

TypesHierarchy: number = 1

Hierarchy mode that groups the TreeViewNodes by type.

This mode creates a two-level hierarchy. At the root level, we get TreeViewNodes that represent each of the distinct types in our !Data | Data. Each of those gets one or more child TreeViewNodes that represent !DataObject | DataObjects of that type. When those DataObjects have ViewObjects of the same ID, then the TreeViewNodes will have checkboxes that we can use to show, hide, and X-ray their ViewObjects.

Accessors

Methods

  • Parameters

    • level: number = 0
    • ctx: any
    • buildingNode: any

    Returns boolean