Vertex Viewer SDK
    Preparing search index...

    Interface VertexSceneTree

    interface VertexSceneTree {
        collapseAll: () => Promise<void>;
        collapseItem: (row: RowArg) => Promise<void>;
        config?: string | Config;
        configEnv: Environment;
        controller?: SceneTreeController;
        deselectItem: (row: RowArg) => Promise<void>;
        expandAll: () => Promise<void>;
        expandItem: (row: RowArg) => Promise<void>;
        fetchMetadataKeys: () => Promise<string[]>;
        filterItems: (term: string, options?: FilterTreeOptions) => Promise<void>;
        getRowAtClientY: (clientY: number) => Promise<Row>;
        getRowAtIndex: (index: number) => Promise<Row>;
        getRowForEvent: (event: PointerEvent | MouseEvent) => Promise<Row>;
        getRowForItemId: (itemId: string) => Promise<Row>;
        hideItem: (row: RowArg) => Promise<void>;
        invalidateRows: () => Promise<void>;
        isolateItem: (row: RowArg) => Promise<void>;
        metadataKeys: string[];
        metadataSearchExactMatch: boolean;
        metadataSearchKeys: string[];
        operationAnimationDuration: number;
        overScanCount: number;
        rowData?: RowDataProvider;
        scrollToIndex: (index: number, options?: ScrollToOptions) => Promise<void>;
        scrollToItem: (itemId: string, options?: ScrollToOptions) => Promise<void>;
        searchOptions: FilterOptions;
        selectFilteredItems: (
            term: string,
            options?: SceneTreeOperationOptions,
        ) => Promise<void>;
        selectItem: (row: RowArg, options?: SelectItemOptions) => Promise<void>;
        showItem: (row: RowArg) => Promise<void>;
        toggleExpandItem: (row: RowArg) => Promise<void>;
        toggleItemVisibility: (row: RowArg) => Promise<void>;
        viewer?: HTMLVertexViewerElement | null;
        viewerSelector?: string;
    }
    Index
    collapseAll: () => Promise<void>

    Performs an API call to collapse all nodes in the tree.

    collapseItem: (row: RowArg) => Promise<void>

    Performs an API call that will collapse the node associated to the specified row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          A row, row index, or node to collapse.

        Returns Promise<void>

    config?: string | Config

    An object to configure the scene tree.

    configEnv: Environment

    Sets the default environment for the viewer. This setting is used for auto-configuring network hosts.

    Use the config property for manually setting hosts.

    'platprod'
    
    controller?: SceneTreeController
    deselectItem: (row: RowArg) => Promise<void>

    Performs an API call that will deselect the item associated to the given row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to deselect.

        Returns Promise<void>

    expandAll: () => Promise<void>

    Performs an API call to expand all nodes in the tree.

    expandItem: (row: RowArg) => Promise<void>

    Performs an API call that will expand the node associated to the specified row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          A row, row index, or node to expand.

        Returns Promise<void>

    fetchMetadataKeys: () => Promise<string[]>

    Fetches the metadata keys that are available to the scene tree. Metadata keys can be assigned to the scene tree using the metadataKeys property. The scene tree will fetch this metadata and make these values available for data binding.

    Type Declaration

      • (): Promise<string[]>
      • Returns Promise<string[]>

        A promise that resolves with the names of available keys.

    filterItems: (term: string, options?: FilterTreeOptions) => Promise<void>

    Performs an async request that will filter the displayed items in the tree that match the given term and options.

    Type Declaration

      • (term: string, options?: FilterTreeOptions): Promise<void>
      • Parameters

        • term: string

          The filter term.

        • Optionaloptions: FilterTreeOptions

          The options to apply to the filter.

        Returns Promise<void>

        A promise that completes when the request has completed. Note, items are displayed asynchronously. So the displayed items may not reflect the result of this filter when the promise completes.

    getRowAtClientY: (clientY: number) => Promise<Row>

    Returns the row data from the given vertical client position.

    Type Declaration

      • (clientY: number): Promise<Row>
      • Parameters

        • clientY: number

          The vertical client position.

        Returns Promise<Row>

        A row or undefined if the row hasn't been loaded.

    getRowAtIndex: (index: number) => Promise<Row>

    Returns a row at the given index. If the row data has not been loaded, returns undefined.

    Type Declaration

      • (index: number): Promise<Row>
      • Parameters

        • index: number

          The index of the row.

        Returns Promise<Row>

        A row, or undefined if the row hasn't been loaded.

    getRowForEvent: (event: PointerEvent | MouseEvent) => Promise<Row>

    Returns the row data from the given mouse or pointer event. The event must originate from a vertex-scene-tree-table-cell contained by this element, otherwise undefined is returned.

    Type Declaration

      • (event: PointerEvent | MouseEvent): Promise<Row>
      • Parameters

        • event: PointerEvent | MouseEvent

          A mouse or pointer event that originated from this component.

        Returns Promise<Row>

        A row, or undefined if the row hasn't been loaded.

    getRowForItemId: (itemId: string) => Promise<Row>

    Returns the row with the given id. If there is not a row matching the id, returns undefined.

    Type Declaration

      • (itemId: string): Promise<Row>
      • Parameters

        • itemId: string

          An ID of an item to return the row for.

        Returns Promise<Row>

        A row, or undefined if a corresponding row doesn't exist

    hideItem: (row: RowArg) => Promise<void>

    Performs an API call that will hide the item associated to the given row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to hide.

        Returns Promise<void>

    invalidateRows: () => Promise<void>

    Schedules a render of the rows in the scene tree. Useful if any custom data in your scene tree has changed, and you want to update the row's contents.

    Note: This is an asynchronous operation. The update may happen on the next frame.

    isolateItem: (row: RowArg) => Promise<void>

    Performs an API call that will show only the item associated to the given row or row index and fit the camera to the item's bounding box.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to isolate.

        Returns Promise<void>

    metadataKeys: string[]

    A list of part metadata keys that will be made available to each row. This metadata can be used for data binding inside the scene tree's template.

    Note: for the values of these metadata keys to be evaluated for search, they must be provided to the metadataSearchKeys specified in the searchOptions. Otherwise, the search will only be performed against the item name.

    []
    
    metadataSearchExactMatch: boolean

    Use searchOptions Indicates whether the metadata search should use an exact match.

    false
    
    metadataSearchKeys: string[]

    Use searchOptions A list of the metadata keys that a scene tree search should be performed on.

    []
    
    operationAnimationDuration: number

    The duration of operations with animations, in milliseconds, when a user performs an action that results in an animation such as isolate. Defaults to 500ms.

    500
    
    overScanCount: number

    The number of offscreen rows above and below the viewport to render. Having a higher number reduces the chance of the browser not displaying a row while scrolling.

    25
    
    rowData?: RowDataProvider

    A callback that is invoked immediately before a row is about to be rendered. This callback can return additional data that can be bound to in a template.

    <script>
    const table = document.querySelector('vertex-scene-tree-table');
    table.rowData = (row) => {
    return { func: () => console.log('row', row.node.name) };
    };
    </script>
    <vertex-scene-tree>
    <vertex-scene-tree-table>
    <vertex-scene-tree-table-column>
    <template> <button event:click="{{row.data.func}}">Hi</button> </template>
    </vertex-scene-tree-table-column>
    </vertex-scene-tree-table>
    </vertex-scene-tree>
    scrollToIndex: (index: number, options?: ScrollToOptions) => Promise<void>

    Scrolls the tree to the given row index.

    Type Declaration

      • (index: number, options?: ScrollToOptions): Promise<void>
      • Parameters

        • index: number

          An index of the row to scroll to.

        • Optionaloptions: ScrollToOptions

          A set of options to configure the scrolling behavior.

        Returns Promise<void>

    scrollToItem: (itemId: string, options?: ScrollToOptions) => Promise<void>

    Scrolls the tree to an item with the given ID. If the node for the item is not expanded, the tree will expand each of its parent nodes.

    Type Declaration

      • (itemId: string, options?: ScrollToOptions): Promise<void>
      • Parameters

        • itemId: string

          An ID of an item to scroll to.

        • Optionaloptions: ScrollToOptions

          A set of options to configure the scrolling behavior.

        Returns Promise<void>

        A promise that resolves when the operation is finished.

    searchOptions: FilterOptions

    A set of options to configure scene tree searching behavior.

    {}
    
    selectFilteredItems: (
        term: string,
        options?: SceneTreeOperationOptions,
    ) => Promise<void>

    Performs an async request that will select the filtered items in the tree that match the given term.

    Type Declaration

    selectItem: (row: RowArg, options?: SelectItemOptions) => Promise<void>

    Performs an API call that will select the item associated to the given row or row index.

    This method supports a recurseParent option that allows for recursively selecting the next unselected parent node. This behavior is considered stateful. Each call to selectItem will track the ancestry of the passed in rowArg. If calling selectItem with a row not belonging to the ancestry of a previous selection, then this method will perform a standard selection.

    Type Declaration

    showItem: (row: RowArg) => Promise<void>

    Performs an API call that will show the item associated to the given row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to show.

        Returns Promise<void>

    toggleExpandItem: (row: RowArg) => Promise<void>

    Performs an API call that will either expand or collapse the node associated to the given row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to collapse or expand.

        Returns Promise<void>

    toggleItemVisibility: (row: RowArg) => Promise<void>

    Performs an API call that will either hide or show the item associated to the given row or row index.

    Type Declaration

      • (row: RowArg): Promise<void>
      • Parameters

        • row: RowArg

          The row, row index, or node to toggle visibility.

        Returns Promise<void>

    viewer?: HTMLVertexViewerElement | null

    An instance of a <vertex-viewer> element. Either this property or viewerSelector must be set.

    viewerSelector?: string

    A CSS selector that points to a <vertex-viewer> element. Either this property or viewer must be set.