ZoomImageWheelOptions type defines the configuration options for creating a wheel-based zoom interface that supports mouse wheel zooming, pinch-to-zoom gestures, and touch interactions.
Type Definition
Properties
The maximum zoom level allowed. The zoom scale is clamped between 1 (original size) and this value.Example:
Controls the sensitivity of wheel-based zooming. Higher values result in faster zoom on each wheel event.Example:
Duration in milliseconds for the double-tap zoom animation. Controls how quickly the image animates between zoomed and unzoomed states.Example:
Initial state for the zoom component. Allows you to set the starting zoom level, rotation, or enable/disable state.Properties:
enable?: boolean- Whether zoom is initially enabled (default:true)currentZoom?: number- Initial zoom level (default:1)currentRotation?: number- Initial rotation in degrees (default:0)zoomTarget?: HTMLElement | null- Target element to apply zoom transform
Callback function that determines whether single-touch gestures should trigger zoom behavior. Useful for conditionally enabling/disabling touch zoom.Example:
The HTML element to apply zoom transformations to. If not provided, defaults to the first
<img> element within the container.Example:Related Types
ZoomImageWheelState
The internal state managed by the zoom component:ZoomImageWheelStateUpdate
Partial state updates that can be applied:Usage Example
See Also
- createZoomImageWheel - Function that uses these options
- ZoomImageHoverOptions - Options for hover-based zoom
- ZoomImageMoveOptions - Options for move-based zoom
- ZoomImageClickOptions - Options for click-based zoom