import{_ase,oast,caso,Qasa}from"./chunks/framework.1169fbc9.js";constE=JSON.parse('{"title":"Trees and tree customization","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/trees-and-tree-customization.md","filePath":"public/kronos/docs/trees-and-tree-customization.md","lastUpdated":1701136977000}'),s={name:"public/kronos/docs/trees-and-tree-customization.md"},n=a(`<h1 id="trees-and-tree-customization" tabindex="-1">Trees and tree customization <a class="header-anchor" href="#trees-and-tree-customization" aria-label="Permalink to "Trees and tree customization""></a></h1><p>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.</p><h2 id="layoutinfo" tabindex="-1">layoutInfo <a class="header-anchor" href="#layoutinfo" aria-label="Permalink to "layoutInfo""></a></h2><p>The most important part is layoutInfo, containing:</p><ul><li>startTab: The id of the default tab to show on the left at the start.</li><li>showTree: True if the tree tab should be shown at the start of the game. (The other tab will fill the whole page)</li><li>treeLayout: If present, overrides the tree layout and places nodes as you describe instead (explained in the next section).</li></ul><p>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.</p><h2 id="trees" tabindex="-1">Trees <a class="header-anchor" href="#trees" aria-label="Permalink to "Trees""></a></h2><p>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.)</p><p>Here is an example tree:</p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki github-dark vp-code-dark"><code><span class="line"><span style="color:#E1E4E8;">[[</span><span style="color:#9ECBFF;">"p"</span><span style="color:#E1E4E8;">],</span></span>