filter.playback
Animate range and dateRange filters by sliding, expanding, or shrinking the active window across the filter's full domain.
Operates on filter handles (not string ids) — call start(handle, opts) to begin animation; stop(handle) to halt. Throws when called on a handle whose underlying filter does not support playback (anything other than range or dateRange).
Domain auto-inference: the sugar API stores [-Infinity, Infinity] as a sentinel domain so matchRange only consults the user-supplied range. Playback window computation, however, requires a finite domain. start() detects this sentinel and triggers the manager's auto-infer path, then restores the user's original range via setRange so the displayed cut is unchanged.
Methods
- start — begin animation
- pause — pause without resetting progress
- resume — resume from a paused position
- stop — halt and clear playback state
- isPlaying — query whether a handle is currently animating
- progress — get the current normalized progress [0, 1]
Playback modes
| Mode | Behaviour |
|---|---|
slide (default) |
The window of size windowSize slides across the domain at a constant step. |
expand |
The window grows from a point until it covers the full domain. |
shrink |
The window starts at the full domain and contracts to a point. |