
# Interface: IDesignEditorDefinitionInitial

Provides properties to initialize a product in the editor.

For details, you can refer to the [Initial command](https://customerscanvas.com/dev/sdks/ui-framework/widgets/design-editor-commands/initial.html).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setViewerSettings": {
      "zoom": 0.1,
      "zoomMode": 'bestFit',
      "scrollPosition": {x: 0, y: 0}
    }
  }
}
```

## Hierarchy

* [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md)

  ↳ **IDesignEditorDefinitionInitial**

## Index

### Properties

* [OnBoundsNotificationCb](idesigneditordefinitioninitial.md#optional-onboundsnotificationcb)
* [OnImageDpiChanged](idesigneditordefinitioninitial.md#optional-onimagedpichanged)
* [OnRedoProduct](idesigneditordefinitioninitial.md#optional-onredoproduct)
* [OnUndoProduct](idesigneditordefinitioninitial.md#optional-onundoproduct)
* [after](idesigneditordefinitioninitial.md#optional-after)
* [autoCompile](idesigneditordefinitioninitial.md#optional-autocompile)
* [editorConfig](idesigneditordefinitioninitial.md#optional-editorconfig)
* [executeOnce](idesigneditordefinitioninitial.md#optional-executeonce)
* [executeOnlyAfter](idesigneditordefinitioninitial.md#optional-executeonlyafter)
* [initSurfaceIndex](idesigneditordefinitioninitial.md#optional-initsurfaceindex)
* [lock](idesigneditordefinitioninitial.md#optional-lock)
* [maximizeAssetManager](idesigneditordefinitioninitial.md#optional-maximizeassetmanager)
* [message](idesigneditordefinitioninitial.md#optional-message)
* [onCustomButtonClicked](idesigneditordefinitioninitial.md#optional-oncustombuttonclicked)
* [onExecuted](idesigneditordefinitioninitial.md#optional-onexecuted)
* [onInit](idesigneditordefinitioninitial.md#optional-oninit)
* [onItemAdded](idesigneditordefinitioninitial.md#optional-onitemadded)
* [onItemChanged](idesigneditordefinitioninitial.md#optional-onitemchanged)
* [onItemRemoved](idesigneditordefinitioninitial.md#optional-onitemremoved)
* [onProductRevert](idesigneditordefinitioninitial.md#optional-onproductrevert)
* [productDefinition](idesigneditordefinitioninitial.md#productdefinition)
* [resourceId](idesigneditordefinitioninitial.md#optional-resourceid)
* [showPreloader](idesigneditordefinitioninitial.md#optional-showpreloader)
* [timeout](idesigneditordefinitioninitial.md#optional-timeout)
* [viewerSettings](idesigneditordefinitioninitial.md#optional-viewersettings)

## Properties

### `Optional` OnBoundsNotificationCb

• **OnBoundsNotificationCb**? : *function*

#### Type declaration:

▸ (`boundsData`: [IBoundsData](iboundsdata.md)): *void | Array‹function›*

**Parameters:**

Name | Type |
------ | ------ |
`boundsData` | [IBoundsData](iboundsdata.md) |

___

### `Optional` OnImageDpiChanged

• **OnImageDpiChanged**? : *Function | Function[]*

A function that is executed after changing an image item DPI.

___

### `Optional` OnRedoProduct

• **OnRedoProduct**? : *Function | Function[]*

A function that is executed after redo product.

___

### `Optional` OnUndoProduct

• **OnUndoProduct**? : *Function | Function[]*

A function that is executed after undo product.

___

### `Optional` after

• **after**? : *string | string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[after](idesigneditorcommanddefinition.md#optional-after)*

The next commands to be executed after this command completes.

___

### `Optional` autoCompile

• **autoCompile**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[autoCompile](idesigneditorcommanddefinition.md#optional-autocompile)*

If `false`, action will never execute automatically.

___

### `Optional` editorConfig

• **editorConfig**? : *IConfiguration*

The configuration of the editor.

___

### `Optional` executeOnce

• **executeOnce**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[executeOnce](idesigneditorcommanddefinition.md#optional-executeonce)*

If `true`, this command will be executed only once.
You can use it for `initial` command.
For example, we need to change surface depending on the option value.
We write for `initial` and for `updateSurfaces` the same productDefinition with $['option]._
And set `executeOnce = true` for `initial`. And initial will be executed only once.

___

### `Optional` executeOnlyAfter

• **executeOnlyAfter**? : *string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[executeOnlyAfter](idesigneditorcommanddefinition.md#optional-executeonlyafter)*

Current command will be executed in a next update only after all commands executed in this param.
The same example from `executeOnce` param.
We need to execute `updateSurface` on all next updates, exclude the first one.
And we set `executeOnlyAfter = ['initial']` for `updateSurface` command.

___

### `Optional` initSurfaceIndex

• **initSurfaceIndex**? : *number*

Initial surface index

___

### `Optional` lock

• **lock**? : *string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[lock](idesigneditorcommanddefinition.md#optional-lock)*

Name of widgets that show preloader when command executed.

___

### `Optional` maximizeAssetManager

• **maximizeAssetManager**? : *boolean*

Opens the Asset Manager in the full-window mode.

___

### `Optional` message

• **message**? : *string | string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[message](idesigneditorcommanddefinition.md#optional-message)*

The message for preloader.

___

### `Optional` onCustomButtonClicked

• **onCustomButtonClicked**? : *function*

A function that is executed after customButton clicked.

#### Type declaration:

▸ (`sender`: string, `customData`: any): *void | Array‹function›*

**Parameters:**

Name | Type |
------ | ------ |
`sender` | string |
`customData` | any |

___

### `Optional` onExecuted

• **onExecuted**? : *Function | Function[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[onExecuted](idesigneditorcommanddefinition.md#optional-onexecuted)*

Functions that executed after command

___

### `Optional` onInit

• **onInit**? : *Function | Array‹Function›*

___

### `Optional` onItemAdded

• **onItemAdded**? : *Function | Function[]*

A function that is executed after adding an item.

___

### `Optional` onItemChanged

• **onItemChanged**? : *Function | Function[]*

A function that is executed after changing an item.

___

### `Optional` onItemRemoved

• **onItemRemoved**? : *Function | Function[]*

A function that is executed after removing an item.

___

### `Optional` onProductRevert

• **onProductRevert**? : *Function | Function[]*

A function that is executed after clicking the `Revert Product` button.

___

###  productDefinition

• **productDefinition**: *IProductDefinition*

PSD/IDML templates to open. For details, see the [topic about defining products](https://customerscanvas.com/dev/sdks/design-editor-js/product-definition/multiple-pages.html).

___

### `Optional` resourceId

• **resourceId**? : *string*

___

### `Optional` showPreloader

• **showPreloader**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[showPreloader](idesigneditorcommanddefinition.md#optional-showpreloader)*

If `true`, displays the preloader while executing this command.

___

### `Optional` timeout

• **timeout**? : *number*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[timeout](idesigneditorcommanddefinition.md#optional-timeout)*

The timeout for switching preloader messages.

___

### `Optional` viewerSettings

• **viewerSettings**? : *[IDesignEditorDefinitionSetViewerSettings](idesigneditordefinitionsetviewersettings.md)*

Canvas zoom properties.
