VistaHiresTransition Class
The VistaHiresTransition class manages smooth animated transitions when images are loaded or when dimensions/positions change.
Overview
Section titled “Overview”VistaHiresTransition provides:
- Smooth easing animations for size and position changes
- Concurrent animation management
- Frame-by-frame state interpolation
- Animation cancellation
Use Case: Used internally by VistaImage to animate dimension and transform changes. Typically not used directly by applications.
Public Properties
Section titled “Public Properties”None - all properties and map are private/static.
Public Static Methods
Section titled “Public Static Methods”start()
Section titled “start()”Starts an animated transition for a VistaBox instance.
Parameters:
vistaImage- The VistaBox instance to animateonComplete- Callback when animation completesshouldWait- Function returningtrueto pause animationtarget- Target dimensions and transformations to animate to
Example:
stop()
Section titled “stop()”Stops an active animation for a VistaBox instance.
Parameters:
vistaImage- The VistaBox instance
Returns: The animation state at the time of stopping, or undefined if no animation was running
Example:
Animation Behavior
Section titled “Animation Behavior”- Uses easing function (20% of remaining distance per frame) for smooth motion
- Stops when values are within threshold (1px for position, 0.005 for scale)
- Handles multiple concurrent animations per instance
- Respects
shouldWaitcallback to pause during rapid navigation
Related
Section titled “Related”- VistaBox - Container class that uses transitions
- VistaImage - Image class that triggers transitions
- VistaView - Main controller