pub struct TransitionManager { /* private fields */ }Expand description
Transition manager for handling multiple active transitions
Implementations§
Source§impl TransitionManager
impl TransitionManager
Sourcepub fn start(
&mut self,
property: impl Into<String>,
from: f32,
to: f32,
transition: &Transition,
)
pub fn start( &mut self, property: impl Into<String>, from: f32, to: f32, transition: &Transition, )
Start a transition for a property
If reduced motion is preferred, the transition completes instantly (no animation, just jumps to final value).
Sourcepub fn has_active(&self) -> bool
pub fn has_active(&self) -> bool
Check if there are active transitions
Sourcepub fn active_properties(&self) -> impl Iterator<Item = &str>
pub fn active_properties(&self) -> impl Iterator<Item = &str>
Get all active transition property names
Sourcepub fn current_values(&self) -> HashMap<String, f32>
pub fn current_values(&self) -> HashMap<String, f32>
Get all current transition values as a map
Returns a HashMap that can be passed to RenderContext for widgets to access animated property values during rendering.
Sourcepub fn start_for_node(
&mut self,
element_id: impl Into<String>,
property: impl Into<String>,
from: f32,
to: f32,
transition: &Transition,
)
pub fn start_for_node( &mut self, element_id: impl Into<String>, property: impl Into<String>, from: f32, to: f32, transition: &Transition, )
Start a transition for a specific element
Associates the transition with an element ID for partial rendering. If reduced motion is preferred, no transition is added.
Sourcepub fn update_nodes(&mut self, delta: Duration)
pub fn update_nodes(&mut self, delta: Duration)
Update all node-aware transitions
Sourcepub fn get_for_node(&self, element_id: &str, property: &str) -> Option<f32>
pub fn get_for_node(&self, element_id: &str, property: &str) -> Option<f32>
Get current value for a property on a specific node
Sourcepub fn active_node_ids(&self) -> impl Iterator<Item = &str>
pub fn active_node_ids(&self) -> impl Iterator<Item = &str>
Get all element IDs with active transitions
Used for partial rendering - only these nodes need to be redrawn.
Sourcepub fn node_has_active(&self, element_id: &str) -> bool
pub fn node_has_active(&self, element_id: &str) -> bool
Check if a specific node has active transitions
Trait Implementations§
Source§impl Clone for TransitionManager
impl Clone for TransitionManager
Source§fn clone(&self) -> TransitionManager
fn clone(&self) -> TransitionManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more