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.

58 lines 2.57 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { BaseTextItemHandler } from "./BaseTextItemHandler"; var ArchedTextItemHandler = /** @class */ (function (_super) { __extends(ArchedTextItemHandler, _super); function ArchedTextItemHandler(item, textWhizz, apiClient, colorPreviewService) { if (textWhizz === void 0) { textWhizz = null; } if (apiClient === void 0) { apiClient = null; } return _super.call(this, item, textWhizz, apiClient, colorPreviewService) || this; } Object.defineProperty(ArchedTextItemHandler.prototype, "item", { get: function () { return this._getItem(); }, set: function (item) { _super.prototype._setItem.call(this, item); }, enumerable: true, configurable: true }); ArchedTextItemHandler.prototype._onItemPropertyChanged = function (sender, propertyName) { switch (propertyName) { case "center": case "bend": case "warp": this.update(); break; } _super.prototype._onItemPropertyChanged.call(this, sender, propertyName); }; ArchedTextItemHandler.prototype._setDataItem = function (item, itemHandlerData) { _super.prototype._setDataItem.call(this, item, itemHandlerData); this.item.center = item.center; this.item.bend = item.bend; this.item.warp = item.warp; }; ArchedTextItemHandler.prototype._getDefaultPermissions = function () { var permissions = _super.prototype._getDefaultPermissions.call(this); permissions.manipulation.resizeGrips.setCornerArbitrary(false); permissions.manipulation.resizeGrips.edge = false; return permissions; }; ArchedTextItemHandler.typeName = "ArchedTextItemHandler"; return ArchedTextItemHandler; }(BaseTextItemHandler)); export { ArchedTextItemHandler }; //# sourceMappingURL=ArchedTextItemHandler.js.map