TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

Class: SetViewerSettings

A command that defines the canvas zoom. A command that defines the canvas zoom.

For details, you can refer to the ICanvasDefinitionSetViewerSettings.

{
  "type": "canvas",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setViewerSettings": {
      "zoom": 0.1,
      "zoomMode": 'bestFit',
      "scrollPosition": {x: 0, y: 0}
    }
  }
}

For details, you can refer to the IDesignEditorDefinitionSetViewerSettings.

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

Hierarchy

Implements

  • IDesignAtomsCommand

Index

Properties

Accessors

Methods

Properties

Static Name

Name: "setViewerSettings" = "setViewerSettings"

Accessors

name

get name(): string

Returns:string

Methods

execute

execute(params: ICanvasDefinitionSetViewerSettings): Promise‹any›

Overrides CanvasWidgetCommand.execute

Executes this command.

Parameters:

Name Type Description
params ICanvasDefinitionSetViewerSettings Parameters for the command.

Returns:Promise‹any›