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.

30 lines 1.04 kB
// ReSharper disable InconsistentNaming /** * This is a base class for all the classes which represent a state of a vector object. */ var ItemHandlerData = /** @class */ (function () { function ItemHandlerData(handler) { this.__type = "ItemHandlerData"; this.P = []; this.Tg = null; this.ID = ("vo" + new Date().getTime()) + Math.round(Math.random() * 1000); if (handler) { this.P = handler.controlPoints; this.Tg = handler.tag; this.ID = handler.uniqueId; } } ItemHandlerData.prototype.applyState = function (itemData, handler) { if (handler) { handler.beginUpdate(); handler.controlPoints = itemData.P; handler.tag = itemData.Tg; handler.uniqueId = itemData.ID; handler.endUpdate(); } }; return ItemHandlerData; }()); export { ItemHandlerData }; // ReSharper restore InconsistentNaming //# sourceMappingURL=ItemHandlerData.js.map