Back to Website
Show / Hide Table of Contents

Class ChangeBackgroundCommand

Inheritance
BaseProductCommand<IChangeBgArgs, void>
ChangeBackgroundCommand
Package: @aurigma/design-atoms

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
Type Name Description
ProductHandler _productHandler
IHistoryArgs historyArgs
Product product
IChangeBgArgs args
CommandManager _commandManager
ProductThemeManager _productThemeManager
Canvas _canvas
EventManager _eventManager

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
Type Name Description
Surface[] surfaces
"image" type
(bgItem: PlaceholderItem) => void changeBgItem
Color | IColorWithTitle value
Returns
Type Description
any

changeBackground(surfaces, type, changeBgItem, value)

Declaration
changeBackground(surfaces: Surface[], type: "solidColor", changeBgItem: (bgItem: RectangleItem | PlaceholderItem) => Promise<void>, value?: Color | IColorWithTitle): any;
Parameters
Type Name Description
Surface[] surfaces
"solidColor" type
(bgItem: RectangleItem | PlaceholderItem) => Promise<void> changeBgItem
Color | IColorWithTitle value
Returns
Type Description
any

getOrCreateBgItems(surface, type)

Declaration
getOrCreateBgItems(surface: Surface, type: "image"): ShapeItem[];
Parameters
Type Name Description
Surface surface
"image" type
Returns
Type Description
ShapeItem[]

getOrCreateBgItems(surface, type)

Declaration
getOrCreateBgItems(surface: Surface, type: "solidColor"): ShapeItem[];
Parameters
Type Name Description
Surface surface
"solidColor" type
Returns
Type Description
ShapeItem[]

redo()

Declaration
redo(): Promise<void>;
Returns
Type Description
Promise<void>

undo()

Declaration
undo(): Promise<void>;
Returns
Type Description
Promise<void>
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback