-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed-size layout overflows with measure_function
.
#732
Comments
This seems like a legitimate bug. I think the root of the problem here is that we need to treat "replaced" content such as images specially (how exactly, I'm not quite sure). You might be able to work around it by returning a zero size when the |
Appreciate a timely response! I tried returning |
FWIW we're also being affected by the same issue. In our case, it's a "row" flex and it's overflowing to the right. We're also measuring text, instead of an image, but otherwise it's exactly the same. This is a long standing issue btw, I know because we were seeing it on taffy 0.4.3 and I upgraded yesterday to see if it was fixed but no luck. |
taffy
version02453b2 and fae17c2 (v0.6.1)
Platform
Rust
What you did
I took
examples/measure.rs
and changed:compute_layout_with_measure()
to be fixed 512x512.flex_shrink: 1
to childrenStyle
s in hopes it would fix calculation.size
fills available space withpercent(1.0)
.Modified
measure.rs
follows:Result is:
Second leaf height overflows available space.
What went wrong
what were you expecting?
Leaf children should fit into available space.
what actually happened?
Second leaf overflows layout.
Additional information
I've tried different style configurations, including
flex-basis
, but all seems to come down to ameasure_function
which does not receive full information from a parent to properly size image content that would fit the layout.The text was updated successfully, but these errors were encountered: