---
title: "ChangeBackgroundCommand | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ChangeBackgroundCommand/"
---

# ChangeBackgroundCommand

> - [`BaseProductCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#abstract-baseproductcommand)\<[`IChangeBgArgs`](#ichangebgargs), `void`\>

## Classes

### ChangeBackgroundCommand

#### Extends

#### Constructors

##### Constructor

```ts
new ChangeBackgroundCommand(
   productHandler, 
   historyArgs, 
   product, 
   args, 
   commandManager, 
   productThemeManager, 
   canvas, 
   eventManager): ChangeBackgroundCommand;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productHandler` | [`ProductHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ProductHandler.md#producthandler) |
| `historyArgs` | [`IHistoryArgs`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ModelUpdateCommand.md#ihistoryargs) |
| `product` | `Product` |
| `args` | [`IChangeBgArgs`](#ichangebgargs) |
| `commandManager` | [`CommandManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/CommandManager.md#commandmanager) |
| `productThemeManager` | [`ProductThemeManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ProductThemeManager.md#productthememanager) |
| `canvas` | [`Canvas`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Canvas-1.md#canvas) |
| `eventManager` | [`EventManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/EventManager.md#eventmanager) |

###### Returns

[`ChangeBackgroundCommand`](#changebackgroundcommand)

###### Overrides

[`BaseProductCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#abstract-baseproductcommand).[`constructor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#constructor)

#### Methods

##### changeBackground()

###### Call Signature

```ts
changeBackground(
   surfaces, 
   type, 
   changeBgItem, 
   value?): any;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `surfaces` | `Surface`[] |
| `type` | `"image"` |
| `changeBgItem` | (`bgItem`) => `void` |
| `value?` | `any` |

###### Returns

`any`

###### Call Signature

```ts
changeBackground(
   surfaces, 
   type, 
   changeBgItem, 
   value?): any;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `surfaces` | `Surface`[] |
| `type` | `"solidColor"` |
| `changeBgItem` | (`bgItem`) => [`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\> |
| `value?` | `any` |

###### Returns

`any`

##### execute()

```ts
execute(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Inherited from

[`BaseProductCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#abstract-baseproductcommand).[`execute`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#execute)

##### executeCommandBody()

```ts
executeCommandBody(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

```ts
BaseProductCommand._executeCommandBody
```

##### getOrCreateBgItems()

###### Call Signature

```ts
getOrCreateBgItems(surface, type): ShapeItem[];
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `surface` | `Surface` |
| `type` | `"image"` |

###### Returns

`ShapeItem`[]

###### Call Signature

```ts
getOrCreateBgItems(surface, type): ShapeItem[];
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `surface` | `Surface` |
| `type` | `"solidColor"` |

###### Returns

`ShapeItem`[]

##### redo()

```ts
redo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseProductCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#abstract-baseproductcommand).[`redo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#redo)

##### undo()

```ts
undo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseProductCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#abstract-baseproductcommand).[`undo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseProductCommand.md#undo)

## Interfaces

### IChangeBgArgs

#### Properties

##### data

```ts
data: any;
```

##### surfaces

```ts
surfaces: Surface[];
```
