Skip to content

Commit

Permalink
Document NodeMeasure type
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Apr 30, 2024
1 parent 98d5262 commit 725425d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_ui/src/measurement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ pub trait Measure: Send + Sync + 'static {
) -> Vec2;
}

/// A type to serve as Taffy's node context (which allows the content size of leaf nodes to be computed)
///
/// It has specific variants for common built-in types to avoid making them opaque and needing to box them
/// by wrapping them in a closure and a Custom variant that allows arbitrary measurement closures if required.
pub enum NodeMeasure {
Fixed(FixedMeasure),
#[cfg(feature = "bevy_text")]
Expand Down

0 comments on commit 725425d

Please sign in to comment.