Commit 1ee3055f authored by Jeff Avallone's avatar Jeff Avallone

Calling layout on children before laying out node

parent e70705be
......@@ -16,6 +16,10 @@ const layout = data => {
const { type } = data;
if (data.children) {
data.children = data.children.map(layout);
}
return nodeTypes[type]({
props: {},
...data
......
import layout from 'layout';
const layoutSVG = data => {
const child = layout(data.children[0]);
const child = data.children[0];
data.props.innerWidth = child.box.width;
data.props.innerHeight = child.box.height;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment