From 1b2a2040bb4abe01f61c89f8c4d68a47dd79b599 Mon Sep 17 00:00:00 2001 From: TreetopFlyer Date: Fri, 26 Mar 2021 11:41:52 -0400 Subject: [PATCH] nodes store lists --- index.html | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index a812b34..0bdbc16 100644 --- a/index.html +++ b/index.html @@ -356,18 +356,12 @@ var App = { let topics = App.State.Topics; let items = App.State.Items; - if(topics.Active.length == 0 || !topics.Active[0].Parent ) + items.Active = []; + for(let i=0; i { - let structTopics = App.LeafStructure(App.State.Topics); fetch(file) @@ -464,20 +457,33 @@ var App = { let match = structTopics[t]; if(match) { - match.push(output); + match.Leaves.push(output); } }); App.State.Items.All[Math.floor(i/4)] = output; } + + Object.values(structTopics).forEach( inLeaf=> + { + Node.IterateUp(inLeaf, inBranch=> + { + inBranch.Leaves = inBranch.Leaves.concat(inLeaf.Leaves); + } + ); + } + ); + }) .then(inAccept=> { App.ApplyFilters(); App.Render(); + + console.log(structTopics); }); - console.log(structTopics); + }, Topic:(topic)=> {