constant.js 1.4 KB

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