Replies: 1 comment
-
The core abstraction is the We did also have a I also have a PR up that modifies the trait a little. The key thing that's driving changes at the moment is a tricky balance between web-like "open world" systems where the entire node tree is globally accessible to the layout code, and "closed world" systems where each widget in the tree is a black box which you can only interact with via it's public interface (which in Rust ends up being quite restricted because of poor support for dynamic typing - you can't easily express "this object may or may not implement this interface" in Rust). For "open world" systems we really want to handle things like rounding internally within Taffy. But in "closed world" system it won't always be possible for consumers to Taffy to provide us with the interface necessary to make that work, and they'll need to implement that themselves. See also:
Sorry this isn't quite as neat and pinned down as I might like. But I hope that gives you something to go on. |
Beta Was this translation helpful? Give feedback.
-
@nicoburns First of all, thank you for the awesome project.
I need some pointers (if possible), for my own project, a big part of which is heavily inspired by Taffy.
My assumption is that Taffy has some abstract interfaces/functions and "flexbox" and "grid" just implement those, and I assume that other layouts fit in those interfaces as well.
Can you point me to the parts of Taffy that defines such interfaces/parts? In other words, what are the parts that are irrelevant to flexbox or grid or any specific implementation?
Beta Was this translation helpful? Give feedback.
All reactions