gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 501HTML 254C 19JavaScript 81414 Definiciones

Add DEFAULT constant to LayoutOutput (#687)

f88aa22c182ddfeb1f394360e165de7753c7f745 · por Nico Burns · (hace 2 años) · padre a16ec6535 · ver el árbol en este commit

Delta semántico · 1

src/tree/layout.rs

1 archivos · +3 −0

diff --git a/src/tree/layout.rs b/src/tree/layout.rs
index cf720d199..24946ddc7 100644
--- a/src/tree/layout.rs
+++ b/src/tree/layout.rs
@@ -189,6 +189,9 @@ impl LayoutOutput {
         margins_can_collapse_through: false,
     };
 
+    /// A blank layout output
+    pub const DEFAULT: Self = Self::HIDDEN;
+
     /// Constructor to create a `LayoutOutput` from just the size and baselines
     pub fn from_sizes_and_baselines(
         size: Size<f32>,