mesh.js 783 B

123456789101112131415161718192021222324252627
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.mesh = void 0;
  4. const x6_common_1 = require("@antv/x6-common");
  5. exports.mesh = {
  6. color: 'rgba(224,224,224,1)',
  7. thickness: 1,
  8. markup: 'path',
  9. update(elem, options) {
  10. let d;
  11. const width = options.width;
  12. const height = options.height;
  13. const thickness = options.thickness;
  14. if (width - thickness >= 0 && height - thickness >= 0) {
  15. d = ['M', width, 0, 'H0 M0 0 V0', height].join(' ');
  16. }
  17. else {
  18. d = 'M 0 0 0 0';
  19. }
  20. x6_common_1.Dom.attr(elem, {
  21. d,
  22. stroke: options.color,
  23. 'stroke-width': options.thickness,
  24. });
  25. },
  26. };
  27. //# sourceMappingURL=mesh.js.map