ChangeBackgroundCommand
Classes
ChangeBackgroundCommand
Extends
BaseProductCommand<IChangeBgArgs,void>
Constructors
Constructor
new ChangeBackgroundCommand(
productHandler,
historyArgs,
product,
args,
commandManager,
productThemeManager,
canvas,
eventManager): ChangeBackgroundCommand;
Parameters
| Parameter | Type |
|---|---|
productHandler | ProductHandler |
historyArgs | IHistoryArgs |
product | Product |
args | IChangeBgArgs |
commandManager | CommandManager |
productThemeManager | ProductThemeManager |
canvas | Canvas |
eventManager | EventManager |
Returns
Overrides
BaseProductCommand.constructor
Methods
changeBackground()
Call Signature
changeBackground(
surfaces,
type,
changeBgItem,
value?): any;
Parameters
| Parameter | Type |
|---|---|
surfaces | Surface[] |
type | "image" |
changeBgItem | (bgItem) => void |
value? | any |
Returns
any
Call Signature
changeBackground(
surfaces,
type,
changeBgItem,
value?): any;
Parameters
| Parameter | Type |
|---|---|
surfaces | Surface[] |
type | "solidColor" |
changeBgItem | (bgItem) => Promise<void> |
value? | any |
Returns
any
execute()
execute(): Promise<void>;
Returns
Promise<void>
Inherited from
executeCommandBody()
executeCommandBody(): Promise<void>;
Returns
Promise<void>
Overrides
BaseProductCommand._executeCommandBody;
getOrCreateBgItems()
Call Signature
getOrCreateBgItems(surface, type): ShapeItem[];
Parameters
| Parameter | Type |
|---|---|
surface | Surface |
type | "image" |
Returns
ShapeItem[]
Call Signature
getOrCreateBgItems(surface, type): ShapeItem[];
Parameters
| Parameter | Type |
|---|---|
surface | Surface |
type | "solidColor" |
Returns
ShapeItem[]
redo()
redo(): Promise<void>;
Returns
Promise<void>
Overrides
undo()
undo(): Promise<void>;
Returns
Promise<void>
Overrides
Interfaces
IChangeBgArgs
Properties
data
data: any;
surfaces
surfaces: Surface[];