@aurigma/ui-framework
Version:
A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.
80 lines (60 loc) • 1.86 kB
Markdown
# Class: ChangeMockupCommand
A command that changes mockup images in the editor.
A command that changes mockup images in the editor.
For details, you can refer to the [IDesignEditorDefinitionChangeMockup](../interfaces/idesigneditordefinitionchangemockup.md).
```
{
"widgets": [{
"type": "design-editor",
"name": "editor",
"params": {
"inital": { ... },
"changeMockup": {
"data": [{
"mockup": {
"down": "{{$['color']._.props.mockup}}"
},
"previewMockups": "{{$['color']._.props.previews}}"
}]
}
}
}]
}
```
For details, you can refer to the [ICanvasDefinitionChangeMockup](../interfaces/icanvasdefinitionchangemockup.md).
```
{
"widgets": [{
"type": "canvas",
"name": "editor",
"params": {
"inital": { ... },
"changeMockup": {
"data": [{
"mockup": {
"down": "{{$['color']._.props.mockup}}"
},
"previewMockups": "{{$['color']._.props.previews}}"
}]
}
}
}]
}
```
## Hierarchy
* [DesignEditorWidgetCommand](designeditorwidgetcommand.md)
* [CanvasWidgetCommand](canvaswidgetcommand.md)
↳ **ChangeMockupCommand**
## Index
### Methods
* [execute](changemockupcommand.md#execute)
## Methods
### execute
▸ **execute**(`params`: [IDesignEditorDefinitionChangeMockup](../interfaces/idesigneditordefinitionchangemockup.md)): *Promise‹Product‹››*
*Overrides [DesignEditorWidgetCommand](designeditorwidgetcommand.md).[execute](designeditorwidgetcommand.md#abstract-execute)*
Executes this command.
**Parameters:**
Name | Type | Description |
------ | ------ | ------ |
`params` | [IDesignEditorDefinitionChangeMockup](../interfaces/idesigneditordefinitionchangemockup.md) | Parameters for the command. |
**Returns:** *Promise‹Product‹››*