From 8c135954d828f0fd11c3392ad02008ba743407d2 Mon Sep 17 00:00:00 2001 From: TreetopFlyer Date: Sat, 8 May 2021 23:34:54 -0400 Subject: [PATCH] multiple pivots --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 73d18a6..65de943 100644 --- a/index.html +++ b/index.html @@ -177,18 +177,18 @@ let ElNode = ({node}) => let ElPivot = ({pivot}) => { - return h("div", {}, [ - + return h("div", {style:{display:"inline-block"}}, [ + h(ElNode, {node:pivot}) ]); } -let ElRoot = () => +let ElRoot = ({pivots}) => { return h("div", null, [ h("h3", null, "tree view"), - h(ElNode, {node:root}) + ...pivots.map(pivot=>h(ElPivot, {pivot})) ]) }; -render(h(ElRoot, {root:pivotRoot}, null), document.querySelector("#app")); +render(h(ElRoot, {pivots}, null), document.querySelector("#app"));