@aurigma/ui-framework
Version:
A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.
78 lines (58 loc) • 1.75 kB
Markdown
# Class: InitialCommand
A command that defines a product and configures the editor.
A command that defines a product and configures the editor.
For details, you can refer to the [IDesignEditorDefinitionInitial](../interfaces/idesigneditordefinitioninitial.md).
```
{
"widgets": [{
"type": "design-editor",
"name": "editor",
"params": {
"initial":{
"productDefinition":{
"surfaces":[{ "printAreas": [{ "designFile": "mytemplate" }] }]
},
"editorConfig": {
"initialMode": "Advanced"
}
}
}
}]
}
```
For details, you can refer to the [ICanvasDefinitionInitial](../interfaces/icanvasdefinitioninitial.md).
```
{
"widgets": [{
"type": "canvas",
"name": "editor",
"params": {
"initial":{
"productDefinition":{
"surfaces":[{ "printAreas": [{ "designFile": "mytemplate" }] }]
},
"editorConfig": {
"initialMode": "Advanced"
}
}
}
}]
}
```
## Hierarchy
* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)
* [CanvasWidgetCommand](canvaswidgetcommand.md)
↳ **InitialCommand**
## Index
### Methods
* [execute](initialcommand.md#execute)
## Methods
### execute
▸ **execute**(`params`: [IDesignEditorDefinitionInitial](../interfaces/idesigneditordefinitioninitial.md)): *Promise‹any›*
*Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)*
Executes this command.
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`params` | [IDesignEditorDefinitionInitial](../interfaces/idesigneditordefinitioninitial.md) | Parameters for the command. |
**Returns:** *Promise‹any›*