Back to Website
Show / Hide Table of Contents

setViewerSettings

  • Less than a minute to read

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?
Thanks for your feedback!
In This Article
  • Params
  • Example
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback