motion-canvas / motion-canvas

Visualize Your Ideas With Code
https://motioncanvas.io
MIT License
16.07k stars 606 forks source link

Document `layout={false}` #449

Open aarthificial opened 1 year ago

aarthificial commented 1 year ago

Description Modify the Layouts guide to include a section about opting out of the layout using layout={false}.

gmile commented 1 year ago

If I understand well, the main property of layout={false} on a node is to make it stop contributing to the calculation of the layout bounding box measurements? E.g. similarly to what happens in HTML/CSS, when you mark an element as position: absolute?

However, the node can potentially still inherit its styling props from its ancestor tree (as described in DailyTip #1), so nothing changes there.

@aarthificial if the above aligns with your plans for this issue, I'm happy to document this with an example or two. If there are no other takers, ofc 🙇

aarthificial commented 1 year ago

Yes, but as I've mentioned in the tip:

At the moment, this only works for nodes with enabled layout.

There's no inheritance if you disable the layout.