From 10763285c8ef03e2e7639ba1c49e7e9162edbf2a Mon Sep 17 00:00:00 2001 From: s-ol Date: Wed, 27 Jan 2021 14:28:27 +0100 Subject: node collapsing (w/o relayouting) --- src/layout.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/layout.js') diff --git a/src/layout.js b/src/layout.js index 788edca..e256681 100644 --- a/src/layout.js +++ b/src/layout.js @@ -7,6 +7,9 @@ export const init = () => { } export const addNode = (dot, node) => { + if (node.collapsed) + return dot; + const id = node.data.id; dot += ` "${id}" [fixedsize=true; width=${node.dom.offsetWidth / 72}; height=${node.dom.offsetHeight / 72}];\n`; -- cgit v1.2.3