UNPKG

@aurigma/design-atoms-model

Version:

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

76 lines 3 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 { ModelComponent } from "./ModelComponent"; import { equals } from "../Utils/Utils"; var InteractiveZone = /** @class */ (function (_super) { __extends(InteractiveZone, _super); function InteractiveZone() { return _super !== null && _super.apply(this, arguments) || this; } Object.defineProperty(InteractiveZone.prototype, "styleKey", { get: function () { return this._styleKey; }, set: function (value) { if (equals(this._styleKey, value)) return; this._styleKey = value; this._propertyChanged.notify(this, "styleKey"); }, enumerable: true, configurable: true }); Object.defineProperty(InteractiveZone.prototype, "snappingEnabled", { get: function () { return this._snappingEnabled; }, set: function (value) { if (this._snappingEnabled === value) return; this._snappingEnabled = value; this._propertyChanged.notify(this, "snappingEnabled"); }, enumerable: true, configurable: true }); Object.defineProperty(InteractiveZone.prototype, "path", { get: function () { return this._path; }, set: function (value) { if (equals(this._path, value)) return; this._path = value; this._propertyChanged.notify(this, "path"); }, enumerable: true, configurable: true }); InteractiveZone.prototype.clone = function (generateNewIds) { if (generateNewIds === void 0) { generateNewIds = false; } var interactiveZone = new InteractiveZone(); this._copy(this, interactiveZone, generateNewIds); return interactiveZone; }; InteractiveZone.prototype._copy = function (source, destination, generateNewIds) { var _a; _super.prototype._copy.call(this, source, destination, generateNewIds); destination.snappingEnabled = source.snappingEnabled; destination.path = (_a = source.path) === null || _a === void 0 ? void 0 : _a.clone(); destination.styleKey = source.styleKey; }; return InteractiveZone; }(ModelComponent)); export { InteractiveZone }; //# sourceMappingURL=InteractiveZone.js.map