Raxol.Animation.Adaptation (Raxol v2.0.1)

View Source

Handles animation adaptation based on user preferences and accessibility settings.

This module is responsible for:

  • Re-adapting animations when user preferences change
  • Managing animation adaptation for accessibility
  • Handling preference change notifications

Summary

Functions

Re-adapt existing animations if settings have changed.

Check if cognitive accessibility should be applied.

Check if animations should be reduced due to user preferences.

Functions

re_adapt_animations_if_needed(user_preferences_pid, active_animations \\ nil)

Re-adapt existing animations if settings have changed.

This function checks if user preferences have changed and re-adapts all active animations accordingly. Returns a list of animations that were completed due to being disabled.

should_apply_cognitive_accessibility?()

Check if cognitive accessibility should be applied.

should_reduce_motion?(user_preferences_pid \\ nil)

Check if animations should be reduced due to user preferences.