import{_ as e,c as t,o as a,a9 as i}from"./chunks/framework.D8PMdl4T.js";const y=JSON.parse('{"title":"Trees and tree customization","description":"","frontmatter":{},"headers":[],"relativePath":"public/lit/docs/trees-and-tree-customization.md","filePath":"public/lit/docs/trees-and-tree-customization.md","lastUpdated":1604787966000}'),s={name:"public/lit/docs/trees-and-tree-customization.md"},o=i(`

Trees and tree customization

If you want to have something beyond the standard tree on the left tab, you can do that in tree.js. You can change the layout of the tree, including making non-layer nodes, change it into something other than a tree, or hide the left tab altogether. This also introduces the "tree" component, which can be used in your layers as well.

layoutInfo

The most important part is layoutInfo, containing:

Additionally, if you want the main layout to not be a tree, you can edit the "tree-tab" layer at the bottom of tree.js to modify it just like a normal layer's tab. You can even switch between left tabs, using showNavTab(layer) to make that layer appear on the left.

Trees

The tree component is defined as an array of arrays of names of layers or nodes to show in the tree. They work just like layers/ nodes in the main tree (but branches between nodes will only work on the first node if you have duplicates.)

Here is an example tree:

js
[["p"],
 ["left", "blank", "right", "blank"]
 ["a", "b", "blank", "c", "weirdButton"]]

Nodes

Nodes are non-layer buttons that can go in trees. They are defined similarly to layers, but with addNode instead of addLayer.

Features:

`,14),n=[o];function l(r,h,d,p,u,c){return a(),t("div",null,n)}const g=e(s,[["render",l]]);export{y as __pageData,g as default};