Raxol.Adaptive.LayoutTransition
(Raxol v2.3.0)
View Source
Pure functional layout interpolation between two layouts.
Lerps pane positions and sizes. Snaps z_order and hidden lists. Supports linear, ease_in_out, and ease_out easing curves.
Summary
Types
@type easing() :: :linear | :ease_in_out | :ease_out
@type transition() :: %{ from: layout_spec(), to: layout_spec(), duration_ms: pos_integer(), easing: easing(), started_at: integer(), progress: float() }
Functions
@spec cancel(transition()) :: layout_spec()
@spec interpolate_layout(layout_spec(), layout_spec(), float()) :: layout_spec()
@spec start(layout_spec(), layout_spec(), keyword()) :: transition()
@spec tick(transition(), integer()) :: {:in_progress, layout_spec(), transition()} | {:done, layout_spec()}