Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

increase node size per line to fit

AykutSarac40f066d76ad3
diff --git a/src/containers/LiveEditor/helpers.ts b/src/containers/LiveEditor/helpers.ts
index 16b16e38..c78af2bc 100644
--- a/src/containers/LiveEditor/helpers.ts
+++ b/src/containers/LiveEditor/helpers.ts
@@ -32,6 +32,8 @@ export function getEdgeNodes(graph: any, isExpanded: boolean = true): any {
.sort((a, b) => a - b);
const longestLine = lineLengths.reverse()[0];
+ const height = (lines.length * 14 < 30 ? 30 : lines.length * 14) + 10;
+
nodes.push({
id: el.id,
text: toString(el.text),
@@ -39,7 +41,7 @@ export function getEdgeNodes(graph: any, isExpanded: boolean = true): any {
isParent: el.parent,
},
width: isExpanded ? 35 + longestLine * 8 : 180,
- height: 30 + lines.length * 10,
+ height,
});
} else {
edges.push(el);