translate
- Less than a minute to read
This command moves design items on the canvas.
For more details, refer to the Command Manager topic.
Params
items
- an array of item names.translateX
- the distance to move the items along the X-axis, in either points or percent relative to the print area. For example,72
or"10%"
.translateY
- the distance to move the items along the Y-axis, in either points or percent relative to the print area. For example,72
or"10%"
.
For the complete list of parameters, you can refer to IDesignEditorDefinitionTranslateItems.
Example of the config
{
"type": "design-editor",
"name": "editor",
"params": {
"initial": { ... },
"translate": {
"translateParams": {
"items": ["photo"],
"translateX": "10",
"translateY": "10"
}
}
}
}