Use the first layout when rendering the child of a container

This commit is contained in:
Jordan Eldredge 2019-09-01 15:08:58 -07:00
parent b2ad5f2f21
commit bbb0e739b6
2 changed files with 5 additions and 1 deletions

View file

@ -174,6 +174,7 @@ function Container(props) {
if (default_visible !== undefined) {
style.display = default_visible ? "block" : "none";
}
return (
<div data-node-type="container" data-node-id={id} style={style}>
{children}

View file

@ -96,7 +96,10 @@ class Container extends MakiObject {
getcurlayout() {
unimplementedWarning("getcurlayout");
return;
// TODO: For now we just always show the first layout. I think that's the default.
return this.children.find(childNode => {
return childNode.getclassname() === "Layout";
});
}
}