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.

17 lines 739 B
import { ShapeItem } from "./ShapeItem"; import { RectangleF } from "../../Math/RectangleF"; import { Path } from "../../Math/Path"; export class RectangleItem extends ShapeItem { constructor(sourceRec = new RectangleF(0, 0, 10, 10)) { super(Path.rectangle(sourceRec.left, sourceRec.top, sourceRec.width, sourceRec.height)); this.type = RectangleItem.type; this.sourceRectangle = sourceRec; } clone(generateNewIds = false, appropriateParentContainer = false) { const item = new RectangleItem(); this._copy(this, item, generateNewIds, appropriateParentContainer); return item; } } RectangleItem.type = "RectangleItem"; //# sourceMappingURL=RectangleItem.js.map