Polygon.js 783 B

12345678910111213141516171819202122232425262728
  1. import { __extends } from "tslib";
  2. import Path from '../Path.js';
  3. import * as polyHelper from '../helper/poly.js';
  4. var PolygonShape = (function () {
  5. function PolygonShape() {
  6. this.points = null;
  7. this.smooth = 0;
  8. this.smoothConstraint = null;
  9. }
  10. return PolygonShape;
  11. }());
  12. export { PolygonShape };
  13. var 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. ;
  27. Polygon.prototype.type = 'polygon';
  28. export default Polygon;