Nutrient Web SDK

ReferenceZoomConfiguration

Type Alias ZoomConfiguration

This object contains configuration options for zooming. It allows granular control over the viewer zooming behavior.

Type Alias

Example

The following example sets the zoom mode to FIT_TO_WIDTH, the scroll zoom mode to DISABLED, and disables the keyboard zooming.

NutrientViewer.load({
zoom: {
zoomMode: NutrientViewer.ZoomMode.FIT_TO_WIDTH,
wheelZoomMode: NutrientViewer.WheelZoomMode.DISABLED,
options: {
enableKeyboardZoom: false,
},
},
});

Default Value

NutrientViewer.load({
zoom: {
zoomMode: NutrientViewer.ZoomMode.AUTO,
wheelZoomMode: NutrientViewer.WheelZoomMode.WITH_CTRL,
options: {
enableKeyboardZoom: true,
enableGestureZoom: true,
},
},
});

Properties

options

Optional
{ enableGestureZoom?: boolean; enableKeyboardZoom?: boolean }

The zoom options to use.

PropertyDescription
enableGestureZoom

Enable zooming via touch gestures.

enableKeyboardZoom

Enable zooming via keyboard shortcuts (Ctrl/Cmd + [+-]).

"DISABLED" | "ALWAYS" | "WITH_CTRL"

Defines the scroll zoom mode to use.

zoomMode

Optional
"AUTO" | "CUSTOM" | "FIT_TO_WIDTH" | "FIT_TO_VIEWPORT" | number

Defines the zoom mode to use.