
# Interface: ICanvasDefinitionChangeLayout

Provides properties to replace design elements in the editor.

For details, you can refer to the [setSurfaces command](https://customerscanvas.com/dev/editors/ui-framework/widgets/design-editor-commands/set-surfaces.html).
```
{
  "type": "canvas",
  "name": "editor",
  "params": {
    "initial": { ... },
    "changeLayout": [{
      "discardChanges": false,
      "data": {
        "printAreas": [{
          "designFile": "{{'flyer/'+$['layout']._.props.design}}"
        }]
      }
    }]
  }
}
```

## Hierarchy

* [ICanvasCommandDefinition](icanvascommanddefinition.md)

  ↳ **ICanvasDefinitionChangeLayout**

## Index

### Properties

* [after](icanvasdefinitionchangelayout.md#optional-after)
* [data](icanvasdefinitionchangelayout.md#data)
* [dimesions](icanvasdefinitionchangelayout.md#optional-dimesions)
* [discardChanges](icanvasdefinitionchangelayout.md#optional-discardchanges)
* [removeBackground](icanvasdefinitionchangelayout.md#removebackground)
* [sourceSurfaceIndex](icanvasdefinitionchangelayout.md#optional-sourcesurfaceindex)
* [surfaceIndex](icanvasdefinitionchangelayout.md#optional-surfaceindex)
* [viewerSettings](icanvasdefinitionchangelayout.md#optional-viewersettings)

## Properties

### `Optional` after

• **after**? : *string | string[]*

*Inherited from [ICanvasCommandDefinition](icanvascommanddefinition.md).[after](icanvascommanddefinition.md#optional-after)*

The next commands to be executed after this command completes.

___

###  data

• **data**: *any*

A product definition.

___

### `Optional` dimesions

• **dimesions**? : *[SurfaceDimensionsValue](../enums/surfacedimensionsvalue.md)*

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` 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**? : *[ICanvasDefinitionSetViewerSettings](icanvasdefinitionsetviewersettings.md)*

Zoom properties.
