Skip to content

Visualize Your Ideas With Code

fix(2d): ignore children with disabled layout (#669)

Jacobb98c4625c363
diff --git a/packages/2d/src/components/Layout.ts b/packages/2d/src/components/Layout.ts
index d6343254..97d31802 100644
--- a/packages/2d/src/components/Layout.ts
+++ b/packages/2d/src/components/Layout.ts
@@ -777,8 +777,10 @@ export class Layout extends Node {
while (queue.length) {
const child = queue.shift();
if (child instanceof Layout) {
- result.push(child);
- elements.push(child.element);
+ if (child.layoutEnabled()) {
+ result.push(child);
+ elements.push(child.element);
+ }
} else if (child) {
queue.unshift(...child.children());
}