Raxol.Animation.PathManager (Raxol v2.0.1)

View Source

Manages animation target paths and state structure utilities.

This module is responsible for:

  • Qualifying and scoping animation target paths
  • Managing state structure for animations
  • Providing utilities for state updates

Summary

Functions

Ensure that a state structure has the necessary nested structure for a given path.

Qualify a path to be properly scoped to an element.

Set a value in a nested state structure at the specified path.

Update an animation's target path to be properly scoped to an element.

Functions

ensure_state_structure(state, path)

Ensure that a state structure has the necessary nested structure for a given path.

qualify_path(animation_def, path, element_id)

Qualify a path to be properly scoped to an element.

set_in_state(state, path, value)

Set a value in a nested state structure at the specified path.

update_animation_path(animation_def, element_id)

Update an animation's target path to be properly scoped to an element.

If the animation's target_path is a property (e.g., [:opacity]), it will be scoped to the element's state (e.g., [:elements, element_id, :opacity]). If a fully qualified path is provided, it will be used as-is.