@visactor/vrender 0.20.7 → 0.20.8-alpha.1

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.
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@visactor/vrender-core';
2
- export declare const version = "0.20.7";
2
+ export declare const version = "0.20.8-alpha.1";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,16 +21,17 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.20.7", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
25
- vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
26
- vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
27
- (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
28
- (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(), (0, vrender_kits_2.registerImage)(),
29
- (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(), (0, vrender_kits_2.registerPolygon)(),
30
- (0, vrender_kits_2.registerPyramid3d)(), (0, vrender_kits_2.registerRect)(), (0,
31
- vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(), (0, vrender_kits_2.registerShadowRoot)(),
32
- (0, vrender_kits_2.registerSymbol)(), (0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(),
33
- (0, vrender_core_1.registerFlexLayoutPlugin)(), (0, vrender_core_1.registerViewTransform3dPlugin)(),
24
+ exports.version = "0.20.8-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
25
+ vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
26
+ vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
27
+ (0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
28
+ (0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
29
+ (0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
30
+ (0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
31
+ (0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
32
+ (0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
33
+ (0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), (0,
34
+ vrender_core_1.registerFlexLayoutPlugin)(), (0, vrender_core_1.registerViewTransform3dPlugin)(),
34
35
  (0, vrender_core_1.registerHtmlAttributePlugin)(), (0, vrender_core_1.registerReactAttributePlugin)(),
35
36
  (0, vrender_core_1.registerDirectionalLight)(), (0, vrender_core_1.registerOrthoCamera)(),
36
37
  __exportStar(require("@visactor/vrender-core"), exports), __exportStar(require("@visactor/vrender-kits"), exports);
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.20.7\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.20.8-alpha.1\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.es.js CHANGED
@@ -7472,6 +7472,7 @@ class StreamLight extends ACustomAnimate {
7472
7472
  }, target.attribute)), target.addUpdateBoundTag();
7473
7473
  }
7474
7474
  _onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
7475
+ var _a, _b;
7475
7476
  if (customPath.clear(), "line" === g.type) {
7476
7477
  let cache = g.cache;
7477
7478
  Array.isArray(cache) || (cache = [cache]);
@@ -7481,7 +7482,7 @@ class StreamLight extends ACustomAnimate {
7481
7482
  c.curves.forEach(ci => curves.push(ci));
7482
7483
  }), this._updateCurves(customPath, curves, totalLen, ratio);
7483
7484
  }
7484
- if ("area" === g.type) {
7485
+ if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
7485
7486
  const cache = g.cacheArea,
7486
7487
  totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
7487
7488
  return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
@@ -7493,7 +7494,7 @@ class StreamLight extends ACustomAnimate {
7493
7494
  endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
7494
7495
  let lastLen = 0,
7495
7496
  start = !1;
7496
- for (let i = 0; i < curves.length; i++) {
7497
+ for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
7497
7498
  const curveItem = curves[i],
7498
7499
  len = curveItem.getLength(),
7499
7500
  startPercent = 1 - (lastLen + len - startLen) / len;
@@ -11255,7 +11256,8 @@ let DefaultGraphicService = class {
11255
11256
  onAddIncremental: new SyncHook(["graphic", "group", "stage"]),
11256
11257
  onClearIncremental: new SyncHook(["graphic", "group", "stage"]),
11257
11258
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
11258
- afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"])
11259
+ afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
11260
+ clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
11259
11261
  }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
11260
11262
  }
11261
11263
  onAttributeUpdate(graphic) {
@@ -11282,6 +11284,9 @@ let DefaultGraphicService = class {
11282
11284
  afterUpdateAABBBounds(graphic, stage, bounds, params, selfChange) {
11283
11285
  this.hooks.afterUpdateAABBBounds.taps.length && this.hooks.afterUpdateAABBBounds.call(graphic, stage, bounds, params, selfChange);
11284
11286
  }
11287
+ clearAABBBounds(graphic, stage, b) {
11288
+ this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
11289
+ }
11285
11290
  updatePathProxyAABBBounds(aabbBounds, graphic) {
11286
11291
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
11287
11292
  if (!path) return !1;
@@ -11345,11 +11350,10 @@ let DefaultGraphicService = class {
11345
11350
  if (!graphic) return !0;
11346
11351
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
11347
11352
  if (graphic.shadowRoot) return !0;
11348
- if (!graphic.valid) return aabbBounds.clear(), !1;
11349
11353
  const {
11350
11354
  visible = theme.visible
11351
11355
  } = attribute;
11352
- return !!visible || (aabbBounds.clear(), !1);
11356
+ return !(!graphic.valid || !visible) || (aabbBounds.empty() || (application.graphicService.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
11353
11357
  }
11354
11358
  updateTempAABBBounds(aabbBounds) {
11355
11359
  const tb1 = this.tempAABBBounds1,
@@ -15768,7 +15772,7 @@ let Line$1 = class Line extends Graphic {
15768
15772
  } = attribute,
15769
15773
  b = aabbBounds;
15770
15774
  return points.forEach(p => {
15771
- !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
15775
+ !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15772
15776
  }), b;
15773
15777
  }
15774
15778
  updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
@@ -15779,7 +15783,7 @@ let Line$1 = class Line extends Graphic {
15779
15783
  b = aabbBounds;
15780
15784
  return segments.forEach(s => {
15781
15785
  s.points.forEach(p => {
15782
- !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
15786
+ !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15783
15787
  });
15784
15788
  }), b;
15785
15789
  }
@@ -18312,13 +18316,15 @@ class DirtyBoundsPlugin {
18312
18316
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
18313
18317
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
18314
18318
  stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
18319
+ }), application.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
18320
+ stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
18315
18321
  }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
18316
18322
  const stage = graphic.stage;
18317
18323
  stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
18318
18324
  });
18319
18325
  }
18320
18326
  deactivate(context) {
18321
- application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18327
+ application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.clearAABBBounds.taps = application.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18322
18328
  }
18323
18329
  }
18324
18330
 
@@ -24094,7 +24100,7 @@ let BrowserContext2d = class {
24094
24100
  const bez = arr[i];
24095
24101
  this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
24096
24102
  }
24097
- } else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
24103
+ } else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
24098
24104
  }
24099
24105
  arcTo(x1, y1, x2, y2, radiusX) {
24100
24106
  this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
@@ -24148,7 +24154,7 @@ let BrowserContext2d = class {
24148
24154
  return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
24149
24155
  }
24150
24156
  createLinearGradient(x0, y0, x1, y1) {
24151
- return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
24157
+ return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
24152
24158
  }
24153
24159
  createPattern(image, repetition) {
24154
24160
  return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
@@ -28463,7 +28469,7 @@ const registerWrapText = _registerWrapText;
28463
28469
 
28464
28470
  const roughModule = _roughModule;
28465
28471
 
28466
- const version = "0.20.7";
28472
+ const version = "0.20.8-alpha.1";
28467
28473
  preLoadAllModule();
28468
28474
  if (isBrowserEnv()) {
28469
28475
  loadBrowserEnv(container);
package/dist/index.js CHANGED
@@ -7478,6 +7478,7 @@
7478
7478
  }, target.attribute)), target.addUpdateBoundTag();
7479
7479
  }
7480
7480
  _onUpdateLineOrAreaWithCache(customPath, g, end, ratio, out) {
7481
+ var _a, _b;
7481
7482
  if (customPath.clear(), "line" === g.type) {
7482
7483
  let cache = g.cache;
7483
7484
  Array.isArray(cache) || (cache = [cache]);
@@ -7487,7 +7488,7 @@
7487
7488
  c.curves.forEach(ci => curves.push(ci));
7488
7489
  }), this._updateCurves(customPath, curves, totalLen, ratio);
7489
7490
  }
7490
- if ("area" === g.type) {
7491
+ if ("area" === g.type && (null === (_b = null === (_a = g.cacheArea) || void 0 === _a ? void 0 : _a.top) || void 0 === _b ? void 0 : _b.curves)) {
7491
7492
  const cache = g.cacheArea,
7492
7493
  totalLen = cache.top.curves.reduce((a, b) => a + b.getLength(), 0);
7493
7494
  return this._updateCurves(customPath, cache.top.curves, totalLen, ratio);
@@ -7499,7 +7500,7 @@
7499
7500
  endLen = Math.min(null !== (_b = startLen + (null === (_a = this.params) || void 0 === _a ? void 0 : _a.streamLength)) && void 0 !== _b ? _b : 10, totalLen);
7500
7501
  let lastLen = 0,
7501
7502
  start = !1;
7502
- for (let i = 0; i < curves.length; i++) {
7503
+ for (let i = 0; i < curves.length; i++) if (!1 !== curves[i].defined) {
7503
7504
  const curveItem = curves[i],
7504
7505
  len = curveItem.getLength(),
7505
7506
  startPercent = 1 - (lastLen + len - startLen) / len;
@@ -11261,7 +11262,8 @@
11261
11262
  onAddIncremental: new SyncHook(["graphic", "group", "stage"]),
11262
11263
  onClearIncremental: new SyncHook(["graphic", "group", "stage"]),
11263
11264
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
11264
- afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"])
11265
+ afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
11266
+ clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
11265
11267
  }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
11266
11268
  }
11267
11269
  onAttributeUpdate(graphic) {
@@ -11288,6 +11290,9 @@
11288
11290
  afterUpdateAABBBounds(graphic, stage, bounds, params, selfChange) {
11289
11291
  this.hooks.afterUpdateAABBBounds.taps.length && this.hooks.afterUpdateAABBBounds.call(graphic, stage, bounds, params, selfChange);
11290
11292
  }
11293
+ clearAABBBounds(graphic, stage, b) {
11294
+ this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
11295
+ }
11291
11296
  updatePathProxyAABBBounds(aabbBounds, graphic) {
11292
11297
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
11293
11298
  if (!path) return !1;
@@ -11351,11 +11356,10 @@
11351
11356
  if (!graphic) return !0;
11352
11357
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
11353
11358
  if (graphic.shadowRoot) return !0;
11354
- if (!graphic.valid) return aabbBounds.clear(), !1;
11355
11359
  const {
11356
11360
  visible = theme.visible
11357
11361
  } = attribute;
11358
- return !!visible || (aabbBounds.clear(), !1);
11362
+ return !(!graphic.valid || !visible) || (aabbBounds.empty() || (application.graphicService.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
11359
11363
  }
11360
11364
  updateTempAABBBounds(aabbBounds) {
11361
11365
  const tb1 = this.tempAABBBounds1,
@@ -15774,7 +15778,7 @@
15774
15778
  } = attribute,
15775
15779
  b = aabbBounds;
15776
15780
  return points.forEach(p => {
15777
- !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
15781
+ !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15778
15782
  }), b;
15779
15783
  }
15780
15784
  updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds, graphic) {
@@ -15785,7 +15789,7 @@
15785
15789
  b = aabbBounds;
15786
15790
  return segments.forEach(s => {
15787
15791
  s.points.forEach(p => {
15788
- !1 === p.defined && "zero" !== connectedType || b.add(p.x, p.y);
15792
+ !1 === p.defined && "zero" !== connectedType && "connect" !== connectedType || b.add(p.x, p.y);
15789
15793
  });
15790
15794
  }), b;
15791
15795
  }
@@ -18318,13 +18322,15 @@
18318
18322
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
18319
18323
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
18320
18324
  stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
18325
+ }), application.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
18326
+ stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
18321
18327
  }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
18322
18328
  const stage = graphic.stage;
18323
18329
  stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
18324
18330
  });
18325
18331
  }
18326
18332
  deactivate(context) {
18327
- application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18333
+ application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.clearAABBBounds.taps = application.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18328
18334
  }
18329
18335
  }
18330
18336
 
@@ -24100,7 +24106,7 @@
24100
24106
  const bez = arr[i];
24101
24107
  this.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5], z);
24102
24108
  }
24103
- } else this.nativeContext.arc(x, y, radius, startAngle, endAngle, anticlockwise);
24109
+ } else this.nativeContext.arc(x, y, Math.max(0, radius), startAngle, endAngle, anticlockwise);
24104
24110
  }
24105
24111
  arcTo(x1, y1, x2, y2, radiusX) {
24106
24112
  this.nativeContext.arcTo(x1, y1, x2, y2, radiusX);
@@ -24154,7 +24160,7 @@
24154
24160
  return 2 === a.length ? this.nativeContext.createImageData(a[0], a[1]) : 1 === a.length ? this.nativeContext.createImageData(a[0]) : null;
24155
24161
  }
24156
24162
  createLinearGradient(x0, y0, x1, y1) {
24157
- return this.nativeContext.createLinearGradient(x0, y0, x1, y1);
24163
+ return isFinite(x0 + y0 + x1 + y1) || (x0 = 0, y0 = 0, x1 = 0, y1 = 0), this.nativeContext.createLinearGradient(x0, y0, x1, y1);
24158
24164
  }
24159
24165
  createPattern(image, repetition) {
24160
24166
  return 0 === image.width || 0 === image.height ? null : this.nativeContext.createPattern(image, repetition);
@@ -28469,7 +28475,7 @@
28469
28475
 
28470
28476
  const roughModule = _roughModule;
28471
28477
 
28472
- const version = "0.20.7";
28478
+ const version = "0.20.8-alpha.1";
28473
28479
  preLoadAllModule();
28474
28480
  if (isBrowserEnv()) {
28475
28481
  loadBrowserEnv(container);