Skip to main content

setViewerSettings

Defines the canvas zoom.

Params

  • zoom - a zoom value.
  • zoomMode - defines how the product will fit the canvas, one of "none", "bestFit", "bestFitShrinkOnly", "fitToWidth", "fitToHeight", "zoomControl", "fitToWidthShrinkOnly", or "fitToHeightShrinkOnly".
  • scrollPosition - the X and Y coordinates of the visible area.

For the complete list of parameters, you can refer to IDesignEditorDefinitionSetViewerSettings.

Example

{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"setViewerSettings": {
"zoom": 0.1,
"zoomMode": 'bestFit',
"scrollPosition": {x: 0, y: 0}
}
}
}
Was this page helpful?