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.

21 lines 852 B
import { NotImplementedException } from "@aurigma/design-atoms-model/Exception"; import { BaseSurfaceCommand } from "./BaseSurfaceCommand"; export class SetSlugCommand extends BaseSurfaceCommand { constructor(_productHandler, historyArgs, args) { super(args.surface, historyArgs, args); this._productHandler = _productHandler; } async _executeCommandBody() { const normalizedArgs = Object.assign({ surface: this._productHandler.currentSurface }, this._args); const printArea = normalizedArgs.surface.printAreas.firstOrDefault(); if (printArea != null) printArea.slug = normalizedArgs.slug; } redo() { throw new NotImplementedException(); } undo() { throw new NotImplementedException(); } } //# sourceMappingURL=SetSlugCommand.js.map