import{_ as e,c as t,o,d as a}from"./app.99998402.js";const D=JSON.parse('{"title":"Trees and tree customization","description":"","frontmatter":{},"headers":[{"level":2,"title":"layoutInfo","slug":"layoutinfo","link":"#layoutinfo","children":[]},{"level":2,"title":"Trees","slug":"trees","link":"#trees","children":[]},{"level":2,"title":"Nodes","slug":"nodes","link":"#nodes","children":[]}],"relativePath":"public/lit/docs/trees-and-tree-customization.md","lastUpdated":null}'),s={name:"public/lit/docs/trees-and-tree-customization.md"},n=a(`

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),l=[n];function r(i,p,c,h,d,u){return o(),t("div",null,l)}const f=e(s,[["render",r]]);export{D as __pageData,f as default};