⎇ b91874d4e34ecc9054b468a338ffcae6f61a1b4a
benches/generated/justify_content_min_max.rs
Historia
Quién tocó qué
crudo
1pub fn compute() {
2 #[allow(unused_imports)]
3 use taffy::prelude::*;
4 let mut taffy = taffy::Taffy::new();
5 let node0 = taffy
6 .new_leaf(taffy::style::Style {
7 size: taffy::geometry::Size {
8 width: taffy::style::Dimension::Points(60f32),
9 height: taffy::style::Dimension::Points(60f32),
10 },
11 ..Default::default()
12 })
13 .unwrap();
14 let node = taffy
15 .new_with_children(
16 taffy::style::Style {
17 flex_direction: taffy::style::FlexDirection::Column,
18 justify_content: Some(taffy::style::JustifyContent::Center),
19 size: taffy::geometry::Size { width: taffy::style::Dimension::Points(100f32), height: auto() },
20 min_size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(100f32) },
21 max_size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(200f32) },
22 ..Default::default()
23 },
24 &[node0],
25 )
26 .unwrap();
27 taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
28}