constant.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.EVENTS = exports.SVG_ATTR_MAP = exports.SHAPE_TO_TAGS = void 0;
  4. exports.SHAPE_TO_TAGS = {
  5. rect: 'path',
  6. circle: 'circle',
  7. line: 'line',
  8. path: 'path',
  9. marker: 'path',
  10. text: 'text',
  11. polyline: 'polyline',
  12. polygon: 'polygon',
  13. image: 'image',
  14. ellipse: 'ellipse',
  15. dom: 'foreignObject',
  16. };
  17. exports.SVG_ATTR_MAP = {
  18. opacity: 'opacity',
  19. fillStyle: 'fill',
  20. fill: 'fill',
  21. fillOpacity: 'fill-opacity',
  22. strokeStyle: 'stroke',
  23. strokeOpacity: 'stroke-opacity',
  24. stroke: 'stroke',
  25. x: 'x',
  26. y: 'y',
  27. r: 'r',
  28. rx: 'rx',
  29. ry: 'ry',
  30. width: 'width',
  31. height: 'height',
  32. x1: 'x1',
  33. x2: 'x2',
  34. y1: 'y1',
  35. y2: 'y2',
  36. lineCap: 'stroke-linecap',
  37. lineJoin: 'stroke-linejoin',
  38. lineWidth: 'stroke-width',
  39. lineDash: 'stroke-dasharray',
  40. lineDashOffset: 'stroke-dashoffset',
  41. miterLimit: 'stroke-miterlimit',
  42. font: 'font',
  43. fontSize: 'font-size',
  44. fontStyle: 'font-style',
  45. fontVariant: 'font-variant',
  46. fontWeight: 'font-weight',
  47. fontFamily: 'font-family',
  48. startArrow: 'marker-start',
  49. endArrow: 'marker-end',
  50. path: 'd',
  51. class: 'class',
  52. id: 'id',
  53. style: 'style',
  54. preserveAspectRatio: 'preserveAspectRatio',
  55. };
  56. exports.EVENTS = [
  57. 'click',
  58. 'mousedown',
  59. 'mouseup',
  60. 'dblclick',
  61. 'contextmenu',
  62. 'mouseenter',
  63. 'mouseleave',
  64. 'mouseover',
  65. 'mouseout',
  66. 'mousemove',
  67. 'wheel',
  68. ];
  69. //# sourceMappingURL=constant.js.map