
# Class: SetViewerSettings

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

For details, you can refer to the [IDesignEditorDefinitionSetViewerSettings](../interfaces/idesigneditordefinitionsetviewersettings.md).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setViewerSettings": {
      "zoom": 0.1,
      "zoomMode": 'bestFit',
      "scrollPosition": {x: 0, y: 0}
    }
  }
}
```

For details, you can refer to the [ICanvasDefinitionSetViewerSettings](../interfaces/icanvasdefinitionsetviewersettings.md).
```
{
  "type": "canvas",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setViewerSettings": {
      "zoom": 0.1,
      "zoomMode": 'bestFit',
      "scrollPosition": {x: 0, y: 0}
    }
  }
}
```

## Hierarchy

* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)

* [CanvasWidgetCommand](canvaswidgetcommand.md)

  ↳ **SetViewerSettings**

## Implements

* IDesignAtomsCommand

## Index

### Properties

* [Name](setviewersettings.md#static-name)

### Accessors

* [name](setviewersettings.md#name)

### Methods

* [execute](setviewersettings.md#execute)

## Properties

### `Static` Name

▪ **Name**: *"setViewerSettings"* = "setViewerSettings"

## Accessors

###  name

• **get name**(): *string*

**Returns:** *string*

## Methods

###  execute

▸ **execute**(`params`: [IDesignEditorDefinitionSetViewerSettings](../interfaces/idesigneditordefinitionsetviewersettings.md)): *Promise‹void›*

*Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)*

Executes this command.

**Parameters:**

Name | Type | Description |
------ | ------ | ------ |
`params` | [IDesignEditorDefinitionSetViewerSettings](../interfaces/idesigneditordefinitionsetviewersettings.md) | Parameters for the command.  |

**Returns:** *Promise‹void›*
