VistaImageEvent Class
The VistaImageEvent class manages pointer events and translates them into image manipulation actions like zooming, panning, and navigation.
Overview
Section titled “Overview”VistaImageEvent coordinates:
- Single and multi-touch gestures
- Pinch-to-zoom detection
- Pan/drag interactions when zoomed
- Momentum scrolling
- External pointer event listeners
Use Case: Created internally by VistaView. Extensions can register listeners through registerPointerListener().
Public Properties
Section titled “Public Properties”None - all properties are private.
Public Methods
Section titled “Public Methods”constructor()
Section titled “constructor()”Creates a new event handling system for a VistaView instance.
registerPointerListener()
Section titled “registerPointerListener()”Registers an external pointer event listener. Same as calling viewer.registerPointerListener().
Parameters:
listener- Function receiving pointer event data
Example:
start()
Section titled “start()”Starts listening to pointer events on the specified container. Called automatically by VistaView when opening.
Parameters:
imageContainer- The element to attach event listeners to
stop()
Section titled “stop()”Removes all event listeners and cleans up resources. Called automatically by VistaView when closing.
Related
Section titled “Related”- VistaView - Main controller that uses VistaImageEvent
- VistaPointers - Underlying pointer tracking system
- VistaExternalPointerListenerArgs - Event data type