Skip to main content

Interface: IViewerSettings

Parameters of displaying the product on the canvas.

Remarks​

(Editor:class).setViewerSettings takes these options.

Example​

// Changing the zoom and scroll position.
editor.setViewerSettings({zoom: 0.1, zoomMode: 'bestFit', scrollPosition: {x: 0, y: 0}})
.catch(error => {
console.error("Changing the canvas settings failed with exception: ", error);
});

Properties​

zoom?​

optional zoom?: number

The zoom value.


zoomMode?​

optional zoomMode?: ZoomMode

Zoom modes for displaying images.


scrollingPosition?​

optional scrollingPosition?: PointF

Scrolls the canvas to the specified point.


contentAngle?​

optional contentAngle?: number

Defines the rotation angle for the content of placeholders.


clearSelectionOnViewerClick?​

optional clearSelectionOnViewerClick?: boolean

Clears the selection when the user clicks the canvas. The default value is false.


clearSelectionOnDocumentClick?​

optional clearSelectionOnDocumentClick?: boolean

Clears the selection when the user clicks the browser window. The default value is false.

Was this page helpful?