Skip to content

Commit 9661dda

Browse files
committed
Remove unnecessary withStyle param
1 parent 5cb243f commit 9661dda

File tree

1 file changed

+8
-11
lines changed
  • rust/cubesql/cubesql/egraph-debug-template/src

1 file changed

+8
-11
lines changed

rust/cubesql/cubesql/egraph-debug-template/src/index.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,16 @@ function layout(
111111
edges: elkEdges,
112112
};
113113

114-
function elk2flow(node, flattenChildren, withStyle) {
114+
function elk2flow(node, flattenChildren) {
115115
node.position = { x: node.x, y: node.y };
116-
if (withStyle) {
117-
node.style = {
118-
...node.style,
119-
width: node.width,
120-
height: node.height,
121-
};
122-
}
116+
node.style = {
117+
...node.style,
118+
width: node.width,
119+
height: node.height,
120+
};
123121
flattenChildren.push(node);
124122
(node.children ?? []).forEach((child) => {
125-
// only depth 0 get styles
126-
elk2flow(child, flattenChildren, false);
123+
elk2flow(child, flattenChildren);
127124
});
128125
delete node.children;
129126
}
@@ -135,7 +132,7 @@ function layout(
135132
const flattenChildren = [];
136133

137134
children.forEach((node) => {
138-
elk2flow(node, flattenChildren, true);
135+
elk2flow(node, flattenChildren);
139136
});
140137

141138
setNodes(flattenChildren);

0 commit comments

Comments
 (0)