tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5544Rust 88Markdown 11TOML 91926 Definitions

Improve working and correctness of doc-comment (#256)

82b3fc7e42222239eb09e2ae4c242ed3efc5aa0e · by Andreas Weibye · (3 years ago) · parent b2046b120 · browse the tree at this commit

Semantic delta

No definition changed: this change is text, documentation or data.

1 files · +3 −1

diff --git a/src/tree.rs b/src/tree.rs
index 6645234c9..ddd05b965 100644
--- a/src/tree.rs
+++ b/src/tree.rs
@@ -32,7 +32,9 @@ pub trait LayoutTree {
     /// Modify the node's output layout
     fn layout_mut(&mut self, node: Node) -> &mut Layout;
 
-    /// Mark a node as finished
+    /// Mark a node as dirty to tell Taffy that something has changed and it needs to be recomputed.
+    ///
+    /// Commonly done if the style of the node has changed.
     fn mark_dirty(&mut self, node: Node) -> TaffyResult<()>;
 
     /// Measure a node. Taffy uses this to force reflows of things like text and overflowing content.