Interface ICanvasDefinitionChangeLayout
Provides properties to replace design elements in the editor. For details, you can refer to the setSurfaces command.
{
"type": "canvas",
"name": "editor",
"params": {
"initial": { ... },
"changeLayout": [{
"discardChanges": false,
"data": {
"printAreas": [{
"designFile": "{{'flyer/'+$['layout']._.props.design}}"
}]
}
}]
}
}
Package: ui-framework
Properties
after
The next commands to be executed after this command completes.
Declaration
after?: string | string[]
Property Value
Type | Description |
---|---|
string | string[] | The next commands to be executed after this command completes. |
data
A product definition.
Declaration
data: any
Property Value
Type | Description |
---|---|
any | A product definition. |
dimesions
If the layout and the currently loaded product have different dimensions, you can enable the size of either config
or canvas
, correspondingly.
Declaration
dimesions?: SurfaceDimensionsValue
Property Value
Type | Description |
---|---|
SurfaceDimensionsValue | If the layout and the currently loaded product have different dimensions, you can enable the size of either |
discardChanges
If true
, a design always loaded from scratch. if false
or omitted, merges placeholders and text elements.
Declaration
discardChanges?: boolean
Property Value
Type | Description |
---|---|
boolean | If |
removeBackground
If true
, removes the background image.
Declaration
removeBackground: boolean
Property Value
Type | Description |
---|---|
boolean | If |
sourceSurfaceIndex
Specifies what page to be used as a layout if data
refers to a multipage template.
Declaration
sourceSurfaceIndex?: number
Property Value
Type | Description |
---|---|
number | Specifies what page to be used as a layout if |
surfaceIndex
The index of a surface that should be modified (the current surface if omitted).
Declaration
surfaceIndex?: number
Property Value
Type | Description |
---|---|
number | The index of a surface that should be modified (the current surface if omitted). |
viewerSettings
Zoom properties.
Declaration
viewerSettings?: ICanvasDefinitionSetViewerSettings
Property Value
Type | Description |
---|---|
ICanvasDefinitionSetViewerSettings | Zoom properties. |