@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.
39 lines • 1.89 kB
JavaScript
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";
import { ResizeGripsPermissions } from "./ResizeGripsPermissions";
var EllipseItem = /** @class */ (function (_super) {
__extends(EllipseItem, _super);
function EllipseItem(sourceRec) {
if (sourceRec === void 0) { sourceRec = new RectangleF(0, 0, 10, 10); }
var _this = _super.call(this, Path.ellipse(sourceRec.left, sourceRec.top, sourceRec.width, sourceRec.height)) || this;
_this.type = EllipseItem.type;
_this.sourceRectangle = sourceRec;
_this.manipulationPermissions.resizeGrips = new ResizeGripsPermissions(true, true);
return _this;
}
EllipseItem.prototype.clone = function (generateNewIds, appropriateParentContainer) {
if (generateNewIds === void 0) { generateNewIds = false; }
if (appropriateParentContainer === void 0) { appropriateParentContainer = false; }
var item = new EllipseItem();
this._copy(this, item, generateNewIds, appropriateParentContainer);
return item;
};
EllipseItem.type = "EllipseItem";
return EllipseItem;
}(ShapeItem));
export { EllipseItem };
//# sourceMappingURL=EllipseItem.js.map