primitive.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.getPrimitiveAttributes = exports.isPrimitiveAttribute = exports.PRIMILTIVE_ATTRIBUTES = void 0;
  4. exports.PRIMILTIVE_ATTRIBUTES = [
  5. '$el',
  6. 'anchor',
  7. 'cx',
  8. 'cy',
  9. 'd',
  10. 'defX',
  11. 'defY',
  12. 'dx',
  13. 'dy',
  14. 'fill',
  15. 'fillOpacity',
  16. 'filter',
  17. 'fontFamily',
  18. 'fontSize',
  19. 'fontStyle',
  20. 'fontVariant',
  21. 'fontWeight',
  22. 'height',
  23. 'img',
  24. 'increasedLineWidthForHitTesting',
  25. 'innerHTML',
  26. 'isBillboard',
  27. 'isClosed',
  28. 'isOverflowing',
  29. 'leading',
  30. 'letterSpacing',
  31. 'lineDash',
  32. 'lineHeight',
  33. 'lineWidth',
  34. 'markerEnd',
  35. 'markerEndOffset',
  36. 'markerMid',
  37. 'markerStart',
  38. 'markerStartOffset',
  39. 'maxLines',
  40. 'metrics',
  41. 'miterLimit',
  42. 'offsetX',
  43. 'offsetY',
  44. 'opacity',
  45. 'path',
  46. 'points',
  47. 'r',
  48. 'radius',
  49. 'rx',
  50. 'ry',
  51. 'shadowColor',
  52. 'src',
  53. 'stroke',
  54. 'strokeOpacity',
  55. 'text',
  56. 'textAlign',
  57. 'textBaseline',
  58. 'textDecorationColor',
  59. 'textDecorationLine',
  60. 'textDecorationStyle',
  61. 'textOverflow',
  62. 'textPath',
  63. 'textPathSide',
  64. 'textPathStartOffset',
  65. 'transform',
  66. 'transformOrigin',
  67. 'visibility',
  68. 'width',
  69. 'wordWrap',
  70. 'wordWrapWidth',
  71. 'x',
  72. 'x1',
  73. 'x2',
  74. 'y',
  75. 'y1',
  76. 'y2',
  77. 'z1',
  78. 'z2',
  79. 'zIndex',
  80. ];
  81. function isPrimitiveAttribute(key) {
  82. return exports.PRIMILTIVE_ATTRIBUTES.includes(key);
  83. }
  84. exports.isPrimitiveAttribute = isPrimitiveAttribute;
  85. function getPrimitiveAttributes(attributes) {
  86. var object = {};
  87. for (var key in attributes) {
  88. if (isPrimitiveAttribute(key))
  89. object[key] = attributes[key];
  90. }
  91. return object;
  92. }
  93. exports.getPrimitiveAttributes = getPrimitiveAttributes;
  94. //# sourceMappingURL=primitive.js.map