tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definiciones

fix flex hypothetical_inner_main_size calc

e190f99006621cf58b63f8cd20d4957941157d4b · por Emil Sjölander · (hace 7 años) · padre 0208b2515 · ver el árbol en este commit

Delta semántico · 1

src/algo.rs

1 archivos · +2 −1

diff --git a/src/algo.rs b/src/algo.rs
index af8e2c721..cd3b035a3 100644
--- a/src/algo.rs
+++ b/src/algo.rs
@@ -368,7 +368,8 @@ fn compute_internal(
                 percent_calc_base_child,
             ).size
             .width
-            .min(child.node.width.resolve(percent_calc_base_child, f32::MAX))
+            .min(child.node.width.resolve(percent_calc_base_child, f32::NAN))
+            .max(child.node.min_width.resolve(percent_calc_base_child, f32::MIN))
         } else {
             child.node.min_main_size(node.flex_direction).resolve(percent_calc_base_child, f32::MIN)
         };