UNPKG

783 BJavaScriptView Raw
1import { __extends } from "tslib";
2import Path from '../Path.js';
3import * as polyHelper from '../helper/poly.js';
4var PolygonShape = (function () {
5 function PolygonShape() {
6 this.points = null;
7 this.smooth = 0;
8 this.smoothConstraint = null;
9 }
10 return PolygonShape;
11}());
12export { PolygonShape };
13var Polygon = (function (_super) {
14 __extends(Polygon, _super);
15 function Polygon(opts) {
16 return _super.call(this, opts) || this;
17 }
18 Polygon.prototype.getDefaultShape = function () {
19 return new PolygonShape();
20 };
21 Polygon.prototype.buildPath = function (ctx, shape) {
22 polyHelper.buildPath(ctx, shape, true);
23 };
24 return Polygon;
25}(Path));
26;
27Polygon.prototype.type = 'polygon';
28export default Polygon;