UNPKG

@aurigma/design-atoms

Version:

Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.

24 lines 1.21 kB
import { BaseItemsCommand } from "./BaseItemsCommand"; import { NotImplementedException } from "@aurigma/design-atoms-model/Exception"; import { PlaceholderItem } from "@aurigma/design-atoms-model/Product/Items"; export class PlaceholderContentRotateCommand extends BaseItemsCommand { constructor(productHandler, args, historyArgs) { super(productHandler, historyArgs, args); } async _executeCommandBody() { var _a; const items = (_a = this._getTargetItems(this._args.items, this._args.query, this._args.queryOptions)) !== null && _a !== void 0 ? _a : this._productHandler.selectedItems; const clockwise = this._args.clockwise != null ? this._args.clockwise : true; items.filter(i => i instanceof PlaceholderItem).forEach(pl => { const placeholderItemHandler = this._productHandler.getHandler(pl); return clockwise ? placeholderItemHandler.rotateContentRight() : placeholderItemHandler.rotateContentLeft(); }); } redo() { throw new NotImplementedException(); } undo() { throw new NotImplementedException(); } } //# sourceMappingURL=PlaceholderContentRotateCommand.js.map