@antv/g 5.0.17 → 5.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/index.umd.min.js +31 -0
  2. package/es/AbstractRenderer.js +3 -1
  3. package/es/Canvas.d.ts +4 -1
  4. package/es/Canvas.js +4 -2
  5. package/es/DisplayObjectPool.js +3 -1
  6. package/es/camera/Camera.js +3 -1
  7. package/es/camera/Landmark.js +3 -1
  8. package/es/components/Cullable.js +3 -1
  9. package/es/components/Geometry.js +3 -1
  10. package/es/components/Renderable.js +3 -1
  11. package/es/components/Sortable.js +3 -1
  12. package/es/components/Transform.js +3 -1
  13. package/es/display-objects/Circle.js +3 -1
  14. package/es/display-objects/CustomElement.js +3 -1
  15. package/es/display-objects/DisplayObject.js +6 -3
  16. package/es/display-objects/Ellipse.js +3 -1
  17. package/es/display-objects/Group.js +3 -1
  18. package/es/display-objects/HTML.js +6 -3
  19. package/es/display-objects/Image.js +3 -1
  20. package/es/display-objects/Line.js +3 -1
  21. package/es/display-objects/Path.js +3 -1
  22. package/es/display-objects/Polygon.js +3 -1
  23. package/es/display-objects/Polyline.js +3 -1
  24. package/es/display-objects/Rect.js +3 -1
  25. package/es/display-objects/Text.js +6 -3
  26. package/es/dom/Animation.js +4 -2
  27. package/es/dom/AnimationEffectTiming.js +3 -1
  28. package/es/dom/AnimationEvent.js +3 -1
  29. package/es/dom/AnimationTimeline.js +3 -1
  30. package/es/dom/CustomElementRegistry.js +3 -1
  31. package/es/dom/CustomEvent.js +3 -1
  32. package/es/dom/Document.js +3 -1
  33. package/es/dom/Element.d.ts +6 -0
  34. package/es/dom/Element.js +16 -5
  35. package/es/dom/EventTarget.js +5 -3
  36. package/es/dom/FederatedEvent.d.ts +2 -2
  37. package/es/dom/FederatedEvent.js +3 -1
  38. package/es/dom/FederatedMouseEvent.js +3 -1
  39. package/es/dom/FederatedPointerEvent.js +3 -1
  40. package/es/dom/FederatedWheelEvent.js +3 -1
  41. package/es/dom/KeyframeEffect.js +3 -1
  42. package/es/dom/KeyframeList.js +1 -1
  43. package/es/dom/MutationEvent.js +3 -1
  44. package/es/dom/MutationObserver.js +10 -3
  45. package/es/dom/MutationRecord.js +3 -1
  46. package/es/dom/Node.js +4 -2
  47. package/es/dom/interfaces.d.ts +3 -0
  48. package/es/plugins/CullingPlugin.js +3 -1
  49. package/es/plugins/DirtyCheckPlugin.js +3 -1
  50. package/es/plugins/EventPlugin.d.ts +1 -1
  51. package/es/plugins/EventPlugin.js +3 -1
  52. package/es/plugins/FrustumCullingStrategy.js +6 -3
  53. package/es/plugins/PrepareRendererPlugin.js +3 -1
  54. package/es/property-handlers/color.js +2 -2
  55. package/es/property-handlers/dimension.js +1 -1
  56. package/es/property-handlers/path.d.ts +1 -1
  57. package/es/property-handlers/text.js +1 -1
  58. package/es/services/EventService.js +13 -5
  59. package/es/services/RenderingService.d.ts +12 -2
  60. package/es/services/RenderingService.js +24 -5
  61. package/es/services/SceneGraphSelector.js +3 -1
  62. package/es/services/SceneGraphService.js +11 -11
  63. package/es/services/aabb/CircleUpdater.js +3 -1
  64. package/es/services/aabb/EllipseUpdater.js +3 -1
  65. package/es/services/aabb/LineUpdater.js +3 -1
  66. package/es/services/aabb/PathUpdater.js +3 -1
  67. package/es/services/aabb/PolylineUpdater.js +3 -1
  68. package/es/services/aabb/RectUpdater.js +3 -1
  69. package/es/services/aabb/TextUpdater.js +15 -1
  70. package/es/services/text/OffscreenCanvasCreator.js +3 -1
  71. package/es/services/text/index.js +5 -3
  72. package/es/shapes/AABB.js +8 -1
  73. package/es/shapes/BoundingSphere.js +3 -1
  74. package/es/shapes/Frustum.js +3 -1
  75. package/es/shapes/Plane.js +3 -1
  76. package/es/shapes/Point.js +3 -1
  77. package/es/shapes/Polygon.js +3 -1
  78. package/es/shapes/Ray.js +3 -1
  79. package/es/shapes/Rect.js +3 -1
  80. package/es/shapes/Rectangle.js +3 -1
  81. package/es/utils/custom-easing.js +1 -1
  82. package/es/utils/event.js +6 -5
  83. package/es/utils/index.d.ts +1 -0
  84. package/es/utils/index.js +2 -1
  85. package/es/utils/path.d.ts +1 -1
  86. package/es/utils/path.js +3 -3
  87. package/es/utils/text.js +3 -3
  88. package/lib/AbstractRenderer.js +3 -1
  89. package/lib/Canvas.d.ts +4 -1
  90. package/lib/Canvas.js +5 -3
  91. package/lib/DisplayObjectPool.js +3 -1
  92. package/lib/camera/Camera.js +4 -2
  93. package/lib/camera/Landmark.js +3 -1
  94. package/lib/components/Cullable.js +4 -2
  95. package/lib/components/Geometry.js +3 -1
  96. package/lib/components/Renderable.js +3 -1
  97. package/lib/components/Sortable.js +3 -1
  98. package/lib/components/Transform.js +3 -1
  99. package/lib/display-objects/Circle.js +3 -1
  100. package/lib/display-objects/CustomElement.js +3 -1
  101. package/lib/display-objects/DisplayObject.js +6 -3
  102. package/lib/display-objects/Ellipse.js +3 -1
  103. package/lib/display-objects/Group.js +3 -1
  104. package/lib/display-objects/HTML.js +6 -4
  105. package/lib/display-objects/Image.js +3 -1
  106. package/lib/display-objects/Line.js +3 -1
  107. package/lib/display-objects/Path.js +3 -1
  108. package/lib/display-objects/Polygon.js +3 -1
  109. package/lib/display-objects/Polyline.js +3 -1
  110. package/lib/display-objects/Rect.js +3 -1
  111. package/lib/display-objects/Text.js +6 -4
  112. package/lib/dom/Animation.js +4 -2
  113. package/lib/dom/AnimationEffectTiming.js +3 -1
  114. package/lib/dom/AnimationEvent.js +3 -1
  115. package/lib/dom/AnimationTimeline.js +4 -2
  116. package/lib/dom/CustomElementRegistry.js +3 -1
  117. package/lib/dom/CustomEvent.js +3 -1
  118. package/lib/dom/Document.js +3 -1
  119. package/lib/dom/Element.d.ts +6 -0
  120. package/lib/dom/Element.js +16 -5
  121. package/lib/dom/EventTarget.js +5 -3
  122. package/lib/dom/FederatedEvent.d.ts +2 -2
  123. package/lib/dom/FederatedEvent.js +3 -1
  124. package/lib/dom/FederatedMouseEvent.js +3 -1
  125. package/lib/dom/FederatedPointerEvent.js +3 -1
  126. package/lib/dom/FederatedWheelEvent.js +3 -1
  127. package/lib/dom/KeyframeEffect.js +4 -2
  128. package/lib/dom/KeyframeList.js +1 -1
  129. package/lib/dom/MutationEvent.js +3 -1
  130. package/lib/dom/MutationObserver.js +11 -4
  131. package/lib/dom/MutationRecord.js +3 -1
  132. package/lib/dom/Node.js +4 -2
  133. package/lib/dom/interfaces.d.ts +3 -0
  134. package/lib/global-module.js +3 -2
  135. package/lib/index.js +1 -1
  136. package/lib/plugins/CullingPlugin.js +4 -2
  137. package/lib/plugins/DirtyCheckPlugin.js +3 -1
  138. package/lib/plugins/EventPlugin.d.ts +1 -1
  139. package/lib/plugins/EventPlugin.js +3 -1
  140. package/lib/plugins/FrustumCullingStrategy.js +5 -2
  141. package/lib/plugins/PrepareRendererPlugin.js +3 -1
  142. package/lib/property-handlers/color.js +5 -5
  143. package/lib/property-handlers/dimension.js +6 -5
  144. package/lib/property-handlers/inherit.js +1 -1
  145. package/lib/property-handlers/interfaces.js +1 -1
  146. package/lib/property-handlers/numeric.js +3 -3
  147. package/lib/property-handlers/path.d.ts +1 -1
  148. package/lib/property-handlers/path.js +1 -1
  149. package/lib/property-handlers/text.js +1 -1
  150. package/lib/property-handlers/transform.js +1 -1
  151. package/lib/services/EventService.js +13 -5
  152. package/lib/services/RenderingService.d.ts +12 -2
  153. package/lib/services/RenderingService.js +25 -5
  154. package/lib/services/SceneGraphSelector.js +4 -2
  155. package/lib/services/SceneGraphService.js +13 -17
  156. package/lib/services/aabb/CircleUpdater.js +3 -1
  157. package/lib/services/aabb/EllipseUpdater.js +3 -1
  158. package/lib/services/aabb/LineUpdater.js +3 -1
  159. package/lib/services/aabb/PathUpdater.js +3 -1
  160. package/lib/services/aabb/PolylineUpdater.js +3 -1
  161. package/lib/services/aabb/RectUpdater.js +3 -1
  162. package/lib/services/aabb/TextUpdater.js +15 -1
  163. package/lib/services/aabb/index.js +10 -10
  164. package/lib/services/aabb/interfaces.js +1 -1
  165. package/lib/services/text/OffscreenCanvasCreator.js +3 -1
  166. package/lib/services/text/index.js +5 -3
  167. package/lib/shapes/AABB.js +8 -1
  168. package/lib/shapes/BoundingSphere.js +3 -1
  169. package/lib/shapes/Frustum.js +4 -2
  170. package/lib/shapes/Plane.js +3 -1
  171. package/lib/shapes/Point.js +3 -1
  172. package/lib/shapes/Polygon.js +3 -1
  173. package/lib/shapes/Ray.js +3 -1
  174. package/lib/shapes/Rect.js +3 -1
  175. package/lib/shapes/Rectangle.js +3 -1
  176. package/lib/types.js +1 -1
  177. package/lib/utils/animation.js +3 -2
  178. package/lib/utils/bezier-easing.js +1 -1
  179. package/lib/utils/custom-easing.js +2 -2
  180. package/lib/utils/event.js +9 -7
  181. package/lib/utils/index.d.ts +1 -0
  182. package/lib/utils/index.js +13 -0
  183. package/lib/utils/math.js +5 -5
  184. package/lib/utils/path.d.ts +1 -1
  185. package/lib/utils/path.js +6 -6
  186. package/lib/utils/raf.js +2 -1
  187. package/lib/utils/text.js +3 -3
  188. package/package.json +3 -3
  189. package/es/display-objects/TSpan.d.ts +0 -1
  190. package/es/display-objects/TSpan.js +0 -0
  191. package/lib/display-objects/TSpan.d.ts +0 -1
  192. package/lib/display-objects/TSpan.js +0 -1
package/lib/utils/raf.js CHANGED
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.cancelAnimationFrame = void 0;
6
7
  exports.patch = patch;
7
- exports.cancelAnimationFrame = exports.requestAnimationFrame = void 0;
8
+ exports.requestAnimationFrame = void 0;
8
9
 
9
10
  var _requestAnimationFramePolyfill = require("request-animation-frame-polyfill");
10
11
 
package/lib/utils/text.js CHANGED
@@ -16,7 +16,7 @@ function toFontString(attributes) {
16
16
  fontVariant = attributes.fontVariant,
17
17
  fontWeight = attributes.fontWeight; // build canvas api font setting from individual components. Convert a numeric this.fontSize to px
18
18
 
19
- var fontSizeString = (0, _util.isNumber)(fontSize) ? fontSize + "px" : "" + fontSize.value + (fontSize.unit || 'px'); // Clean-up fontFamily property by quoting each font name
19
+ var fontSizeString = (0, _util.isNumber)(fontSize) ? "".concat(fontSize, "px") : "".concat(fontSize.value).concat(fontSize.unit || 'px'); // Clean-up fontFamily property by quoting each font name
20
20
  // this will support font names with spaces
21
21
  // @ts-ignore
22
22
 
@@ -31,11 +31,11 @@ function toFontString(attributes) {
31
31
  var fontFamily_1 = fontFamilies[i].trim(); // Check if font already contains strings
32
32
 
33
33
  if (!/([\"\'])[^\'\"]+\1/.test(fontFamily_1) && genericFontFamilies.indexOf(fontFamily_1) < 0) {
34
- fontFamily_1 = "\"" + fontFamily_1 + "\"";
34
+ fontFamily_1 = "\"".concat(fontFamily_1, "\"");
35
35
  }
36
36
 
37
37
  fontFamilies[i] = fontFamily_1;
38
38
  }
39
39
 
40
- return fontStyle + " " + fontVariant + " " + fontWeight + " " + fontSizeString + " " + fontFamilies.join(',');
40
+ return "".concat(fontStyle, " ").concat(fontVariant, " ").concat(fontWeight, " ").concat(fontSizeString, " ").concat(fontFamilies.join(','));
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/g",
3
- "version": "5.0.17",
3
+ "version": "5.0.18",
4
4
  "description": "A core module including ECS and DI container.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://github.com/antvis/g#readme",
39
39
  "dependencies": {
40
- "@antv/g-math": "^1.0.14",
40
+ "@antv/g-math": "^1.0.15",
41
41
  "@antv/path-util": "^2.0.14",
42
42
  "@antv/util": "^2.0.13",
43
43
  "@types/offscreencanvas": "^2019.6.4",
@@ -54,5 +54,5 @@
54
54
  "scripts": {
55
55
  "umd": "webpack"
56
56
  },
57
- "gitHead": "0c7b71ca68a0ada7e50c9eeec3c47f9b7de44f01"
57
+ "gitHead": "c32d65599adc9e7c3d31ca5710fb3968e01bff43"
58
58
  }
@@ -1 +0,0 @@
1
-
File without changes
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- "use strict";