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?
optionalzoom?:number
The zoom value.
zoomMode?
optionalzoomMode?:ZoomMode
Zoom modes for displaying images.
scrollingPosition?
optionalscrollingPosition?:PointF
Scrolls the canvas to the specified point.
contentAngle?
optionalcontentAngle?:number
Defines the rotation angle for the content of placeholders.
clearSelectionOnViewerClick?
optionalclearSelectionOnViewerClick?:boolean
Clears the selection when the user clicks the canvas. The default value is false.
clearSelectionOnDocumentClick?
optionalclearSelectionOnDocumentClick?:boolean
Clears the selection when the user clicks the browser window. The default value is false.