TrophyCustomer's Canvas is honored with a 2020 InterTech Technology Award! Learn more 

Interface: IDesignEditorDefinitionChangeLayout

Provides properties to replace design elements in the editor.

{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "changeLayout": [{
      "discardChanges": false,
      "data": {
        "printAreas": [{
          "designFile": "{{'flyer/'+$['layout']._.props.design}}"
        }]
      }
    }]
  }
}

Hierarchy

Index

Properties

Properties

Optional after

after? : string | string[]

Inherited from IDesignEditorCommandDefinition.after

The next commands to be executed after this command completes.


data

data: any

A product definition.


Optional dimesions

dimesions? : SurfaceDimensionsValue

If the layout and the currently loaded product have different dimensions, you can enable the size of either config or canvas, correspondingly.


Optional discardChanges

discardChanges? : boolean

If true, a design always loaded from scratch. if false or omitted, merges placeholders and text elements.


removeBackground

removeBackground: boolean

If true, removes the background image.


Optional showPreloader

showPreloader? : boolean

Inherited from IDesignEditorCommandDefinition.showPreloader

If true, displays the preloader while executing this command.


Optional sourceSurfaceIndex

sourceSurfaceIndex? : number

Specifies what page to be used as a layout if data refers to a multipage template.


Optional surfaceIndex

surfaceIndex? : number

The index of a surface that should be modified (the current surface if omitted).


Optional viewerSettings

viewerSettings? : IDesignEditorDefinitionSetViewerSettings

Zoom properties.