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.

37 lines 1.75 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 { ShapeItem } from "./ShapeItem"; import { RectangleF } from "../../Math/RectangleF"; import { Path } from "../../Math/Path"; var RectangleItem = /** @class */ (function (_super) { __extends(RectangleItem, _super); function RectangleItem(sourceRec) { if (sourceRec === void 0) { sourceRec = new RectangleF(0, 0, 10, 10); } var _this = _super.call(this, Path.rectangle(sourceRec.left, sourceRec.top, sourceRec.width, sourceRec.height)) || this; _this.type = RectangleItem.type; _this.sourceRectangle = sourceRec; return _this; } RectangleItem.prototype.clone = function (generateNewIds, appropriateParentContainer) { if (generateNewIds === void 0) { generateNewIds = false; } if (appropriateParentContainer === void 0) { appropriateParentContainer = false; } var item = new RectangleItem(); this._copy(this, item, generateNewIds, appropriateParentContainer); return item; }; RectangleItem.type = "RectangleItem"; return RectangleItem; }(ShapeItem)); export { RectangleItem }; //# sourceMappingURL=RectangleItem.js.map