Class ChangeBackgroundCommand
Inheritance
ChangeBackgroundCommand
Constructors
(constructor)(_productHandler, historyArgs, product, args, _commandManager, _productThemeManager, _canvas, _eventManager)
Constructs a new instance of the ChangeBackgroundCommand class
Declaration
constructor(_productHandler: ProductHandler, historyArgs: IHistoryArgs, product: Product, args: IChangeBgArgs, _commandManager: CommandManager, _productThemeManager: ProductThemeManager, _canvas: Canvas, _eventManager: EventManager);
Parameters
Methods
_executeCommandBody()
Declaration
_executeCommandBody(): Promise<void>;
Returns
| Type |
Description |
| Promise<void> |
|
changeBackground(surfaces, type, changeBgItem, value)
Declaration
changeBackground(surfaces: Surface[], type: "image", changeBgItem: (bgItem: PlaceholderItem) => void, value?: Color | IColorWithTitle): any;
Parameters
Returns
changeBackground(surfaces, type, changeBgItem, value)
Declaration
changeBackground(surfaces: Surface[], type: "solidColor", changeBgItem: (bgItem: RectangleItem | PlaceholderItem) => Promise<void>, value?: Color | IColorWithTitle): any;
Parameters
Returns
getOrCreateBgItems(surface, type)
Declaration
getOrCreateBgItems(surface: Surface, type: "image"): ShapeItem[];
Parameters
| Type |
Name |
Description |
| Surface |
surface |
|
| "image" |
type |
|
Returns
getOrCreateBgItems(surface, type)
Declaration
getOrCreateBgItems(surface: Surface, type: "solidColor"): ShapeItem[];
Parameters
| Type |
Name |
Description |
| Surface |
surface |
|
| "solidColor" |
type |
|
Returns
redo()
Declaration
Returns
| Type |
Description |
| Promise<void> |
|
undo()
Declaration
Returns
| Type |
Description |
| Promise<void> |
|