@visactor/vtable 0.19.2-alpha.1 → 0.19.2-alpha.2

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 (77) hide show
  1. package/cjs/PivotChart.d.ts +0 -1
  2. package/cjs/PivotChart.js +0 -4
  3. package/cjs/PivotChart.js.map +1 -1
  4. package/cjs/core/BaseTable.d.ts +0 -3
  5. package/cjs/core/BaseTable.js +23 -37
  6. package/cjs/core/BaseTable.js.map +1 -1
  7. package/cjs/event/event.js +1 -2
  8. package/cjs/event/event.js.map +1 -1
  9. package/cjs/event/listener/container-dom.js +1 -1
  10. package/cjs/event/listener/container-dom.js.map +1 -1
  11. package/cjs/event/util.js +2 -2
  12. package/cjs/event/util.js.map +1 -1
  13. package/cjs/index.d.ts +1 -1
  14. package/cjs/index.js +1 -1
  15. package/cjs/index.js.map +1 -1
  16. package/cjs/scenegraph/debug-tool/debug-tool.js +1 -4
  17. package/cjs/scenegraph/debug-tool/debug-tool.js.map +1 -1
  18. package/cjs/scenegraph/graphic/chart.d.ts +0 -1
  19. package/cjs/scenegraph/graphic/chart.js +19 -33
  20. package/cjs/scenegraph/graphic/chart.js.map +1 -1
  21. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
  22. package/cjs/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  23. package/cjs/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
  24. package/cjs/scenegraph/graphic/contributions/chart-render.js +24 -40
  25. package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  26. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  27. package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  28. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
  29. package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  30. package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -1
  31. package/cjs/scenegraph/refresh-node/update-chart.js +2 -9
  32. package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
  33. package/cjs/scenegraph/scenegraph.js +5 -11
  34. package/cjs/scenegraph/scenegraph.js.map +1 -1
  35. package/cjs/ts-types/base-table.d.ts +1 -11
  36. package/cjs/ts-types/base-table.js.map +1 -1
  37. package/cjs/vrender.js.map +1 -1
  38. package/dist/vtable.js +370 -488
  39. package/dist/vtable.min.js +2 -2
  40. package/es/PivotChart.d.ts +0 -1
  41. package/es/PivotChart.js +2 -5
  42. package/es/PivotChart.js.map +1 -1
  43. package/es/core/BaseTable.d.ts +0 -3
  44. package/es/core/BaseTable.js +22 -36
  45. package/es/core/BaseTable.js.map +1 -1
  46. package/es/event/event.js +1 -2
  47. package/es/event/event.js.map +1 -1
  48. package/es/event/listener/container-dom.js +1 -1
  49. package/es/event/listener/container-dom.js.map +1 -1
  50. package/es/event/util.js +2 -2
  51. package/es/event/util.js.map +1 -1
  52. package/es/index.d.ts +1 -1
  53. package/es/index.js +1 -1
  54. package/es/index.js.map +1 -1
  55. package/es/scenegraph/debug-tool/debug-tool.js +1 -4
  56. package/es/scenegraph/debug-tool/debug-tool.js.map +1 -1
  57. package/es/scenegraph/graphic/chart.d.ts +0 -1
  58. package/es/scenegraph/graphic/chart.js +20 -32
  59. package/es/scenegraph/graphic/chart.js.map +1 -1
  60. package/es/scenegraph/graphic/contributions/chart-render-helper.js +8 -20
  61. package/es/scenegraph/graphic/contributions/chart-render-helper.js.map +1 -1
  62. package/es/scenegraph/graphic/contributions/chart-render.d.ts +1 -2
  63. package/es/scenegraph/graphic/contributions/chart-render.js +25 -41
  64. package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
  65. package/es/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
  66. package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
  67. package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
  68. package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
  69. package/es/scenegraph/refresh-node/update-chart.d.ts +0 -1
  70. package/es/scenegraph/refresh-node/update-chart.js +0 -6
  71. package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
  72. package/es/scenegraph/scenegraph.js +5 -11
  73. package/es/scenegraph/scenegraph.js.map +1 -1
  74. package/es/ts-types/base-table.d.ts +1 -11
  75. package/es/ts-types/base-table.js.map +1 -1
  76. package/es/vrender.js.map +1 -1
  77. package/package.json +5 -5
package/dist/vtable.js CHANGED
@@ -4280,7 +4280,7 @@
4280
4280
  strokeBoundsBuffer: 0,
4281
4281
  keepDirIn3d: !0
4282
4282
  });
4283
- const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
4283
+ const DefaultRichTextAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
4284
4284
  width: 300,
4285
4285
  height: 300,
4286
4286
  ellipsis: !0,
@@ -4830,20 +4830,9 @@
4830
4830
  this._handler.setStyle(style);
4831
4831
  }
4832
4832
  create(params) {
4833
- var _a, _b;
4834
4833
  this._handler.createWindow(params);
4835
4834
  const windowWH = this._handler.getWH();
4836
- this._width = windowWH.width, this._height = windowWH.height, params.viewBox ? this.setViewBox(params.viewBox) : !1 !== params.canvasControled ? this.setViewBox({
4837
- x1: 0,
4838
- y1: 0,
4839
- x2: this._width,
4840
- y2: this._height
4841
- }) : this.setViewBox({
4842
- x1: 0,
4843
- y1: 0,
4844
- x2: null !== (_a = params.width) && void 0 !== _a ? _a : this._width,
4845
- y2: null !== (_b = params.height) && void 0 !== _b ? _b : this._height
4846
- }), this.title = this._handler.getTitle(), this.resizable = !0;
4835
+ this._width = windowWH.width, this._height = windowWH.height, this.title = this._handler.getTitle(), this.resizable = !0;
4847
4836
  }
4848
4837
  setWindowHandler(handler) {
4849
4838
  this._handler = handler;
@@ -4884,35 +4873,8 @@
4884
4873
  getContainer() {
4885
4874
  return this._handler.container;
4886
4875
  }
4887
- clearViewBox(color) {
4888
- this._handler.clearViewBox(color);
4889
- }
4890
- setViewBox(viewBox) {
4891
- this._handler.setViewBox(viewBox);
4892
- }
4893
- setViewBoxTransform(a, b, c, d, e, f) {
4894
- this._handler.setViewBoxTransform(a, b, c, d, e, f);
4895
- }
4896
- getViewBox() {
4897
- return this._handler.getViewBox();
4898
- }
4899
- getViewBoxTransform() {
4900
- return this._handler.getViewBoxTransform();
4901
- }
4902
- pointTransform(x, y) {
4903
- const vb = this._handler.getViewBox(),
4904
- nextP = {
4905
- x: x,
4906
- y: y
4907
- };
4908
- return this._handler.getViewBoxTransform().transformPoint({
4909
- x: x,
4910
- y: y
4911
- }, nextP), nextP.x -= vb.x1, nextP.y -= vb.y1, nextP;
4912
- }
4913
- hasSubView() {
4914
- const viewBox = this._handler.getViewBox();
4915
- return !(0 === viewBox.x1 && 0 === viewBox.y1 && this.width === viewBox.width() && this.height === viewBox.height());
4876
+ clearViewBox(viewBox, color) {
4877
+ this._handler.clearViewBox(viewBox, color);
4916
4878
  }
4917
4879
  isVisible(bbox) {
4918
4880
  return this._handler.isVisible(bbox);
@@ -4998,16 +4960,8 @@
4998
4960
  const window = container.get(VWindow),
4999
4961
  bounds = graphic.AABBBounds,
5000
4962
  width = bounds.width(),
5001
- height = bounds.height(),
5002
- x1 = -bounds.x1,
5003
- y1 = -bounds.y1;
4963
+ height = bounds.height();
5004
4964
  window.create({
5005
- viewBox: {
5006
- x1: x1,
5007
- y1: y1,
5008
- x2: bounds.x2,
5009
- y2: bounds.y2
5010
- },
5011
4965
  width: width,
5012
4966
  height: height,
5013
4967
  canvas: canvas,
@@ -5016,10 +4970,14 @@
5016
4970
  offscreen: !0,
5017
4971
  title: ""
5018
4972
  });
5019
- const disableCheckGraphicWidthOutRange = stage.params.optimize.disableCheckGraphicWidthOutRange;
4973
+ const x = -bounds.x1,
4974
+ y = -bounds.y1,
4975
+ disableCheckGraphicWidthOutRange = stage.params.optimize.disableCheckGraphicWidthOutRange;
5020
4976
  stage.params.optimize.disableCheckGraphicWidthOutRange = !0, stage.defaultLayer.getNativeHandler().drawTo(window, [graphic], {
5021
- transMatrix: window.getViewBoxTransform(),
5022
- viewBox: window.getViewBox(),
4977
+ x: x,
4978
+ y: y,
4979
+ width: width,
4980
+ height: height,
5023
4981
  stage: stage,
5024
4982
  layer: stage.defaultLayer,
5025
4983
  renderService: stage.renderService,
@@ -5358,7 +5316,7 @@
5358
5316
  delete() {
5359
5317
  this.parent && this.parent.removeChild(this);
5360
5318
  }
5361
- removeAllChild(deep) {
5319
+ removeAllChild() {
5362
5320
  if (!this._idMap) return;
5363
5321
  let child = this._firstChild;
5364
5322
  for (; child;) {
@@ -5843,7 +5801,7 @@
5843
5801
  const mappers = this.mappingTable[e.type];
5844
5802
  let target;
5845
5803
  const cacheKey = `${e.canvasX}-${e.canvasY}`;
5846
- if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage) && (null === (_e = null === (_d = this._prePointTargetCache) || void 0 === _d ? void 0 : _d[cacheKey]) || void 0 === _e ? void 0 : _e.stage.renderCount) === (null === (_f = this._prePointTargetCache) || void 0 === _f ? void 0 : _f.stageRenderCount) ? target = this._prePointTargetCache[cacheKey] : (target = this.pickTarget(e.viewX, e.viewY, e), e.pickParams || (this._prePointTargetCache = {
5804
+ if ((null === (_a = this._prePointTargetCache) || void 0 === _a ? void 0 : _a[cacheKey]) && (null === (_c = null === (_b = this._prePointTargetCache) || void 0 === _b ? void 0 : _b[cacheKey]) || void 0 === _c ? void 0 : _c.stage) && (null === (_e = null === (_d = this._prePointTargetCache) || void 0 === _d ? void 0 : _d[cacheKey]) || void 0 === _e ? void 0 : _e.stage.renderCount) === (null === (_f = this._prePointTargetCache) || void 0 === _f ? void 0 : _f.stageRenderCount) ? target = this._prePointTargetCache[cacheKey] : (target = this.pickTarget(e.canvasX, e.canvasY, e), e.pickParams || (this._prePointTargetCache = {
5847
5805
  [cacheKey]: target,
5848
5806
  stageRenderCount: null !== (_g = null == target ? void 0 : target.stage.renderCount) && void 0 !== _g ? _g : -1
5849
5807
  })), mappers) for (let i = 0, j = mappers.length; i < j; i++) mappers[i].fn(e, target);else Logger.getInstance().warn(`[EventManager]: Event mapping not defined for ${e.type}`);
@@ -5987,7 +5945,7 @@
5987
5945
  this.setCursor(this.manager.cursor, this.manager.cursorTarget);
5988
5946
  }, this.onPointerUp = nativeEvent => {
5989
5947
  if (this.supportsTouchEvents && "touch" === nativeEvent.pointerType) return;
5990
- const outside = this.isEventOutsideOfTargetViewPort(nativeEvent) ? "outside" : "",
5948
+ const outside = this.isEventOutsideOfTargetElement(nativeEvent) ? "outside" : "",
5991
5949
  normalizedEvents = this.normalizeToPointerData(nativeEvent);
5992
5950
  for (let i = 0, j = normalizedEvents.length; i < j; i++) {
5993
5951
  const event = this.bootstrapEvent(this.rootPointerEvent, normalizedEvents[i]);
@@ -6011,6 +5969,7 @@
6011
5969
  resolution: resolution,
6012
5970
  rootNode: rootNode,
6013
5971
  global: global,
5972
+ viewport: viewport,
6014
5973
  autoPreventDefault = !1,
6015
5974
  clickInterval: clickInterval,
6016
5975
  supportsTouchEvents = global.supportsTouchEvents,
@@ -6018,7 +5977,7 @@
6018
5977
  } = params;
6019
5978
  this.manager = new EventManager$1(rootNode, {
6020
5979
  clickInterval: clickInterval
6021
- }), this.globalObj = global, this.supportsPointerEvents = supportsPointerEvents, this.supportsTouchEvents = supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
5980
+ }), this.globalObj = global, this.supportsPointerEvents = supportsPointerEvents, this.supportsTouchEvents = supportsTouchEvents, this.supportsMouseEvents = global.supportsMouseEvents, this.applyStyles = global.applyStyles, this.autoPreventDefault = autoPreventDefault, this.eventsAdded = !1, this.viewport = viewport, this.rootPointerEvent = new FederatedPointerEvent(), this.rootWheelEvent = new FederatedWheelEvent(), this.cursorStyles = {
6022
5981
  default: "inherit",
6023
5982
  pointer: "pointer"
6024
5983
  }, this.resolution = resolution, this.setTargetElement(targetElement);
@@ -6060,7 +6019,15 @@
6060
6019
  this.supportsPointerEvents ? (globalObj.getDocument() ? (globalObj.getDocument().removeEventListener("pointermove", this.onPointerMove, !0), globalObj.getDocument().removeEventListener("pointerup", this.onPointerUp, !0)) : (domElement.removeEventListener("pointermove", this.onPointerMove, !0), domElement.removeEventListener("pointerup", this.onPointerUp, !0)), domElement.removeEventListener("pointerdown", this.onPointerDown, !0), domElement.removeEventListener("pointerleave", this.onPointerOverOut, !0), domElement.removeEventListener("pointerover", this.onPointerOverOut, !0)) : (globalObj.getDocument() ? (globalObj.getDocument().removeEventListener("mousemove", this.onPointerMove, !0), globalObj.getDocument().removeEventListener("mouseup", this.onPointerUp, !0)) : (domElement.removeEventListener("mousemove", this.onPointerMove, !0), domElement.removeEventListener("mouseup", this.onPointerUp, !0)), domElement.removeEventListener("mousedown", this.onPointerDown, !0), domElement.removeEventListener("mouseout", this.onPointerOverOut, !0), domElement.removeEventListener("mouseover", this.onPointerOverOut, !0)), this.supportsTouchEvents && (domElement.removeEventListener("touchstart", this.onPointerDown, !0), domElement.removeEventListener("touchend", this.onPointerUp, !0), domElement.removeEventListener("touchmove", this.onPointerMove, !0)), domElement.removeEventListener("wheel", this.onWheel, !0), this.domElement = null, this.eventsAdded = !1;
6061
6020
  }
6062
6021
  mapToViewportPoint(event) {
6063
- return this.domElement.pointTransform ? this.domElement.pointTransform(event.x, event.y) : event;
6022
+ const viewport = this.viewport,
6023
+ {
6024
+ x: x,
6025
+ y: y
6026
+ } = event;
6027
+ return {
6028
+ x: x - viewport.x,
6029
+ y: y - viewport.y
6030
+ };
6064
6031
  }
6065
6032
  mapToCanvasPoint(nativeEvent) {
6066
6033
  var _a;
@@ -6117,17 +6084,6 @@
6117
6084
  transferMouseData(event, nativeEvent) {
6118
6085
  event.isTrusted = nativeEvent.isTrusted, event.srcElement = nativeEvent.srcElement, event.timeStamp = clock.now(), event.type = nativeEvent.type, event.altKey = nativeEvent.altKey, event.button = nativeEvent.button, event.buttons = nativeEvent.buttons, event.client.x = nativeEvent.clientX, event.client.y = nativeEvent.clientY, event.ctrlKey = nativeEvent.ctrlKey, event.shiftKey = nativeEvent.shiftKey, event.metaKey = nativeEvent.metaKey, event.movement.x = nativeEvent.movementX, event.movement.y = nativeEvent.movementY, event.page.x = nativeEvent.pageX, event.page.y = nativeEvent.pageY, event.relatedTarget = null;
6119
6086
  }
6120
- isEventOutsideOfTargetViewPort(nativeEvent) {
6121
- if (this.isEventOutsideOfTargetElement(nativeEvent)) return !0;
6122
- if (this.domElement.getViewBox) {
6123
- const p = this.mapToViewportPoint(this.mapToCanvasPoint(nativeEvent)),
6124
- b = this.domElement.getViewBox(),
6125
- w = b.width(),
6126
- h = b.height();
6127
- return !(p.x < w && p.y < h && p.x > 0 && p.y > 0);
6128
- }
6129
- return !1;
6130
- }
6131
6087
  isEventOutsideOfTargetElement(nativeEvent) {
6132
6088
  let target = nativeEvent.target;
6133
6089
  nativeEvent.composedPath && nativeEvent.composedPath().length > 0 && (target = nativeEvent.composedPath()[0]);
@@ -7286,8 +7242,7 @@
7286
7242
  }
7287
7243
  }
7288
7244
  tryUpdateGlobalAABBBounds() {
7289
- const b = this.AABBBounds;
7290
- return this._globalAABBBounds ? this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2) : this._globalAABBBounds = b.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
7245
+ return this._globalAABBBounds ? this._globalAABBBounds.setValue(this._AABBBounds.x1, this._AABBBounds.y1, this._AABBBounds.x2, this._AABBBounds.y2) : this._globalAABBBounds = this.AABBBounds.clone(), this.parent && this._globalAABBBounds.transformWithMatrix(this.parent.globalTransMatrix), this._globalAABBBounds;
7291
7246
  }
7292
7247
  tryUpdateGlobalTransMatrix() {
7293
7248
  if (this._globalTransMatrix) {
@@ -8249,9 +8204,8 @@
8249
8204
  return child.stage = null, application.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
8250
8205
  }
8251
8206
  removeAllChild() {
8252
- let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
8253
8207
  this.forEachChildren(child => {
8254
- application.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
8208
+ application.graphicService.onRemove(child);
8255
8209
  }), super.removeAllChild(), this.addUpdateBoundTag();
8256
8210
  }
8257
8211
  setStage(stage, layer) {
@@ -8364,12 +8318,15 @@
8364
8318
  }
8365
8319
  render(params, userParams) {
8366
8320
  var _a;
8321
+ const stage = this.stage;
8367
8322
  this.layerHandler.render([this], {
8368
8323
  renderService: params.renderService,
8324
+ x: stage.x,
8325
+ y: stage.y,
8326
+ width: this.viewWidth,
8327
+ height: this.viewHeight,
8369
8328
  stage: this.stage,
8370
8329
  layer: this,
8371
- viewBox: params.viewBox,
8372
- transMatrix: params.transMatrix,
8373
8330
  background: null !== (_a = params.background) && void 0 !== _a ? _a : this.background,
8374
8331
  updateBounds: params.updateBounds
8375
8332
  }, userParams), this.afterDrawCbs.forEach(c => c(this)), this.tryRenderSecondaryLayer(params, userParams);
@@ -8393,18 +8350,33 @@
8393
8350
  throw new Error("暂不支持");
8394
8351
  }
8395
8352
  prepare(dirtyBounds, params) {}
8353
+ combineTo(target, params) {
8354
+ var _a, _b, _c;
8355
+ this.offscreen && (this.layerHandler.drawTo(target, [this], Object.assign({
8356
+ background: null !== (_a = params.background) && void 0 !== _a ? _a : this.background,
8357
+ renderService: params.renderService,
8358
+ x: null !== (_b = params.x) && void 0 !== _b ? _b : this.stage.x,
8359
+ y: null !== (_c = params.y) && void 0 !== _c ? _c : this.stage.y,
8360
+ width: this.viewWidth,
8361
+ height: this.viewHeight,
8362
+ stage: this.stage,
8363
+ layer: this
8364
+ }, params)), this.afterDrawCbs.forEach(c => c(this)));
8365
+ }
8396
8366
  release() {
8397
8367
  super.release(), this.layerHandler.release(), this.subLayers && this.subLayers.forEach(l => {
8398
8368
  application.layerService.releaseLayer(this.stage, l.layer);
8399
8369
  });
8400
8370
  }
8401
8371
  drawTo(target, params) {
8402
- var _a;
8372
+ var _a, _b, _c;
8403
8373
  this.layerHandler.drawTo(target, [this], Object.assign({
8404
8374
  background: null !== (_a = params.background) && void 0 !== _a ? _a : this.background,
8405
8375
  renderService: params.renderService,
8406
- viewBox: params.viewBox,
8407
- transMatrix: params.transMatrix,
8376
+ x: null !== (_b = params.x) && void 0 !== _b ? _b : this.stage.x,
8377
+ y: null !== (_c = params.y) && void 0 !== _c ? _c : this.stage.y,
8378
+ width: this.viewWidth,
8379
+ height: this.viewHeight,
8408
8380
  stage: this.stage,
8409
8381
  layer: this
8410
8382
  }, params)), this.afterDrawCbs.forEach(c => c(this));
@@ -11008,24 +10980,6 @@
11008
10980
  getFrameCache() {
11009
10981
  return this.shouldUpdateShape() && (this.doUpdateFrameCache(), this.clearUpdateShapeTag()), this._frameCache;
11010
10982
  }
11011
- combinedStyleToCharacter(config) {
11012
- const {
11013
- fill: fill,
11014
- stroke: stroke,
11015
- fontSize: fontSize,
11016
- fontFamily: fontFamily,
11017
- fontStyle: fontStyle,
11018
- fontWeight: fontWeight
11019
- } = this.attribute;
11020
- return Object.assign({
11021
- fill: fill,
11022
- stroke: stroke,
11023
- fontSize: fontSize,
11024
- fontFamily: fontFamily,
11025
- fontStyle: fontStyle,
11026
- fontWeight: fontWeight
11027
- }, config);
11028
- }
11029
10983
  doUpdateFrameCache() {
11030
10984
  var _a;
11031
10985
  const {
@@ -11044,7 +10998,7 @@
11044
10998
  } = this.attribute,
11045
10999
  paragraphs = [];
11046
11000
  for (let i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
11047
- const config = this.combinedStyleToCharacter(textConfig[i]),
11001
+ const config = textConfig[i],
11048
11002
  iconCache = config.id && this._frameCache && this._frameCache.icons && this._frameCache.icons.get(config.id);
11049
11003
  if (iconCache) paragraphs.push(iconCache);else {
11050
11004
  const icon = new RichTextIcon(config);
@@ -11054,7 +11008,7 @@
11054
11008
  }, icon.richtextId = config.id, paragraphs.push(icon);
11055
11009
  }
11056
11010
  } else {
11057
- const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
11011
+ const richTextConfig = textConfig[i];
11058
11012
  if (isNumber$2(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
11059
11013
  const textParts = richTextConfig.text.split("\n");
11060
11014
  for (let j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
@@ -15581,10 +15535,10 @@
15581
15535
  render(group, params) {
15582
15536
  var _a;
15583
15537
  params.renderService.render(group, Object.assign(Object.assign({
15584
- context: this.context,
15585
- viewBox: params.stage.window.getViewBox(),
15586
- transMatrix: params.stage.window.getViewBoxTransform()
15538
+ context: this.context
15587
15539
  }, params), {
15540
+ x: 0,
15541
+ y: 0,
15588
15542
  clear: null !== (_a = params.background) && void 0 !== _a ? _a : "#ffffff"
15589
15543
  }));
15590
15544
  }
@@ -15599,12 +15553,11 @@
15599
15553
  const context = target.getContext(),
15600
15554
  targetDpr = target.dpr,
15601
15555
  {
15602
- viewBox: viewBox
15603
- } = params,
15604
- x = viewBox.x1,
15605
- y = viewBox.y1,
15606
- width = viewBox.width(),
15607
- height = viewBox.height();
15556
+ x = 0,
15557
+ y = 0,
15558
+ width = this.layer.viewWidth,
15559
+ height = this.layer.viewHeight
15560
+ } = params;
15608
15561
  context.nativeContext.save(), context.nativeContext.setTransform(targetDpr, 0, 0, targetDpr, 0, 0), params.clear && context.clearRect(x, y, width, height), context.drawImage(this.canvas.nativeCanvas, 0, 0, this.canvas.width, this.canvas.height, x, y, width, height), context.nativeContext.restore();
15609
15562
  }
15610
15563
  merge(layerHandlers) {}
@@ -15760,22 +15713,32 @@
15760
15713
  const {
15761
15714
  context: context,
15762
15715
  stage: stage,
15763
- viewBox: viewBox,
15764
- transMatrix: transMatrix
15716
+ x = 0,
15717
+ y = 0,
15718
+ width: width,
15719
+ height: height
15765
15720
  } = drawContext;
15766
15721
  if (!context) return;
15767
- const dirtyBounds = this.dirtyBounds.setValue(0, 0, viewBox.width(), viewBox.height());
15722
+ if (drawContext.keepMatrix) {
15723
+ if (context.nativeContext && context.nativeContext.getTransform) {
15724
+ const t = context.nativeContext.getTransform();
15725
+ context.setTransformFromMatrix(t, !0, 1);
15726
+ }
15727
+ } else context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0);
15728
+ const dirtyBounds = this.dirtyBounds.setValue(0, 0, width, height);
15768
15729
  if (stage.dirtyBounds && !stage.dirtyBounds.empty()) {
15769
15730
  const b = getRectIntersect(dirtyBounds, stage.dirtyBounds, !1);
15770
15731
  dirtyBounds.x1 = Math.floor(b.x1), dirtyBounds.y1 = Math.floor(b.y1), dirtyBounds.x2 = Math.ceil(b.x2), dirtyBounds.y2 = Math.ceil(b.y2);
15771
15732
  }
15772
15733
  const d = context.dpr % 1;
15773
- (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds), context.inuse = !0, context.setClearMatrix(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f), context.clearMatrix(), context.setTransformForCurrent(!0), context.translate(viewBox.x1, viewBox.y1, !0), context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip(), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort((a, b) => {
15734
+ (d || .5 !== d) && (dirtyBounds.x1 = Math.floor(dirtyBounds.x1 * context.dpr) / context.dpr, dirtyBounds.y1 = Math.floor(dirtyBounds.y1 * context.dpr) / context.dpr, dirtyBounds.x2 = Math.ceil(dirtyBounds.x2 * context.dpr) / context.dpr, dirtyBounds.y2 = Math.ceil(dirtyBounds.y2 * context.dpr) / context.dpr), this.backupDirtyBounds.copy(dirtyBounds);
15735
+ const drawInArea = dirtyBounds.width() * context.dpr < context.canvas.width || dirtyBounds.height() * context.dpr < context.canvas.height;
15736
+ context.save(), context.translate(x, y, !0), drawInArea && (context.beginPath(), context.rect(dirtyBounds.x1, dirtyBounds.y1, dirtyBounds.width(), dirtyBounds.height()), context.clip()), stage.camera && (this.dirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.backupDirtyBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0)), this.clearScreen(renderService, context, drawContext), context.save(), renderService.renderTreeRoots.sort((a, b) => {
15774
15737
  var _a, _b;
15775
15738
  return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
15776
15739
  }).forEach(group => {
15777
15740
  group.isContainer ? this.renderGroup(group, drawContext, matrixAllocate.allocate(1, 0, 0, 1, 0, 0)) : this.renderItem(group, drawContext);
15778
- }), context.restore(), context.draw(), context.setClearMatrix(1, 0, 0, 1, 0, 0), context.inuse = !1;
15741
+ }), context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1);
15779
15742
  }
15780
15743
  doRegister() {
15781
15744
  throw new Error("暂不支持");
@@ -15894,25 +15857,29 @@
15894
15857
  clearScreen(renderService, context, drawContext) {
15895
15858
  var _a, _b;
15896
15859
  const {
15897
- clear: clear,
15898
- viewBox: viewBox
15899
- } = drawContext,
15900
- width = viewBox.width(),
15901
- height = viewBox.height();
15860
+ clear: clear
15861
+ } = drawContext;
15902
15862
  if (clear) {
15903
- context.clearRect(0, 0, width, height);
15863
+ const canvas = context.getCanvas(),
15864
+ {
15865
+ width = canvas.width,
15866
+ height = canvas.height
15867
+ } = drawContext,
15868
+ x = 0,
15869
+ y = 0;
15870
+ context.clearRect(x, y, width, height);
15904
15871
  const stage = null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage;
15905
15872
  if (stage && (context.globalAlpha = null !== (_b = stage.attribute.opacity) && void 0 !== _b ? _b : 1), stage && stage.backgroundImg && stage.resources) {
15906
15873
  const res = stage.resources.get(clear);
15907
- res && "success" === res.state && res.data && context.drawImage(res.data, 0, 0, width, height);
15874
+ res && "success" === res.state && res.data && context.drawImage(res.data, x, y, width, height);
15908
15875
  } else context.fillStyle = createColor(context, clear, {
15909
15876
  AABBBounds: {
15910
- x1: 0,
15911
- y1: 0,
15912
- x2: 0 + width,
15913
- y2: 0 + height
15877
+ x1: x,
15878
+ y1: y,
15879
+ x2: x + width,
15880
+ y2: y + height
15914
15881
  }
15915
- }, 0, 0), context.fillRect(0, 0, width, height);
15882
+ }, 0, 0), context.fillRect(x, y, width, height);
15916
15883
  }
15917
15884
  }
15918
15885
  afterDraw(renderService, drawParams) {}
@@ -16169,16 +16136,25 @@
16169
16136
  this.currentRenderService = renderService;
16170
16137
  const {
16171
16138
  context: context,
16172
- viewBox: viewBox
16139
+ x = 0,
16140
+ y = 0
16173
16141
  } = drawContext;
16174
- context && (context.inuse = !0, context.clearMatrix(), context.setTransformForCurrent(!0), context.save(), drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext), context.translate(viewBox.x1, viewBox.y1, !0), context.save(), renderService.renderTreeRoots.sort((a, b) => {
16175
- var _a, _b;
16176
- return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
16177
- }).forEach(group => {
16178
- this.renderGroup(group, drawContext);
16179
- }), this.hooks.completeDraw.tap("top-draw", () => {
16180
- context.restore(), context.restore(), context.draw(), context.inuse = !1, this.rendering = !1;
16181
- }));
16142
+ if (context) {
16143
+ if (drawContext.keepMatrix) {
16144
+ if (context.nativeContext && context.nativeContext.getTransform) {
16145
+ const t = context.nativeContext.getTransform();
16146
+ context.setTransformFromMatrix(t, !0, 1);
16147
+ }
16148
+ } else context.inuse = !0, context.clearMatrix();
16149
+ context.setTransformForCurrent(!0), context.save(), drawContext.restartIncremental && this.clearScreen(this.currentRenderService, context, drawContext), context.translate(x, y, !0), context.save(), renderService.renderTreeRoots.sort((a, b) => {
16150
+ var _a, _b;
16151
+ return (null !== (_a = a.attribute.zIndex) && void 0 !== _a ? _a : DefaultAttribute.zIndex) - (null !== (_b = b.attribute.zIndex) && void 0 !== _b ? _b : DefaultAttribute.zIndex);
16152
+ }).forEach(group => {
16153
+ this.renderGroup(group, drawContext);
16154
+ }), this.hooks.completeDraw.tap("top-draw", () => {
16155
+ context.restore(), context.restore(), context.draw(), drawContext.keepMatrix || (context.inuse = !1), this.rendering = !1;
16156
+ });
16157
+ }
16182
16158
  });
16183
16159
  }
16184
16160
  _increaseRender(group, drawContext) {
@@ -16348,10 +16324,12 @@
16348
16324
  if (!layer || !group.layer.subLayers) return;
16349
16325
  const subLayer = group.layer.subLayers.get(group._uid);
16350
16326
  subLayer && subLayer.drawContribution && subLayer.drawContribution.draw(stage.renderService, Object.assign({
16327
+ x: stage.x,
16328
+ y: stage.y,
16329
+ width: layer.viewWidth,
16330
+ height: layer.viewHeight,
16351
16331
  stage: stage,
16352
16332
  layer: layer,
16353
- viewBox: stage.window.getViewBox(),
16354
- transMatrix: stage.window.getViewBoxTransform(),
16355
16333
  clear: "transparent",
16356
16334
  renderService: stage.renderService,
16357
16335
  updateBounds: !1,
@@ -16369,8 +16347,6 @@
16369
16347
  activate(context) {
16370
16348
  this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
16371
16349
  stage && stage === this.pluginService.stage && this.drawHTML(context.stage.renderService);
16372
- }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
16373
- this.removeDom(graphic);
16374
16350
  }), application.graphicService.hooks.onRelease.tap(this.key, graphic => {
16375
16351
  this.removeDom(graphic);
16376
16352
  });
@@ -16415,29 +16391,28 @@
16415
16391
  } = html;
16416
16392
  graphic.bindDom || (graphic.bindDom = new Map());
16417
16393
  const lastDom = graphic.bindDom.get(dom);
16418
- let wrapGroup, nativeContainer;
16419
- if (!lastDom || container && container !== lastDom.container) {
16420
- let nativeDom;
16421
- graphic.bindDom.forEach(_ref => {
16422
- let {
16423
- wrapGroup: wrapGroup
16424
- } = _ref;
16425
- application.global.removeDom(wrapGroup);
16426
- }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
16427
- const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
16428
- nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer(), wrapGroup = application.global.createDom({
16429
- tagName: "div",
16430
- width: width,
16431
- height: height,
16432
- style: style,
16433
- parent: nativeContainer
16434
- }), wrapGroup && (wrapGroup.appendChild(nativeDom), graphic.bindDom.set(dom, {
16435
- dom: nativeDom,
16436
- container: container,
16394
+ if (lastDom && (!container || container === lastDom.container)) return;
16395
+ let nativeDom, nativeContainer;
16396
+ graphic.bindDom.forEach(_ref => {
16397
+ let {
16437
16398
  wrapGroup: wrapGroup
16438
- }));
16439
- } else wrapGroup = lastDom.wrapGroup, nativeContainer = wrapGroup.parentNode;
16440
- wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
16399
+ } = _ref;
16400
+ application.global.removeDom(wrapGroup);
16401
+ }), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
16402
+ const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
16403
+ nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
16404
+ const wrapGroup = application.global.createDom({
16405
+ tagName: "div",
16406
+ width: width,
16407
+ height: height,
16408
+ style: style,
16409
+ parent: nativeContainer
16410
+ });
16411
+ wrapGroup && (wrapGroup.appendChild(nativeDom), graphic.bindDom.set(dom, {
16412
+ dom: nativeDom,
16413
+ container: container,
16414
+ wrapGroup: wrapGroup
16415
+ })), wrapGroup.style.pointerEvents = "none", wrapGroup.style.position || (wrapGroup.style.position = "absolute", nativeContainer.style.position = "relative");
16441
16416
  let left = 0,
16442
16417
  top = 0;
16443
16418
  const b = graphic.globalAABBBounds;
@@ -16905,24 +16880,22 @@
16905
16880
  };
16906
16881
  class Stage extends Group$2 {
16907
16882
  set viewBox(b) {
16908
- this.window.setViewBox(b);
16883
+ this._viewBox.setValue(b.x1, b.y1, b.x2, b.y2);
16909
16884
  }
16910
16885
  get viewBox() {
16911
- return this.window.getViewBox();
16886
+ return this._viewBox;
16912
16887
  }
16913
16888
  get x() {
16914
- return this.window.getViewBox().x1;
16889
+ return this._viewBox.x1;
16915
16890
  }
16916
16891
  set x(x) {
16917
- const b = this.window.getViewBox();
16918
- b.translate(x - b.x1, 0), this.window.setViewBox(b);
16892
+ this._viewBox.translate(x - this._viewBox.x1, 0);
16919
16893
  }
16920
16894
  get y() {
16921
- return this.window.getViewBox().y1;
16895
+ return this._viewBox.y1;
16922
16896
  }
16923
16897
  set y(y) {
16924
- const b = this.window.getViewBox();
16925
- b.translate(0, y - b.y1), this.window.setViewBox(b);
16898
+ this._viewBox.translate(0, y - this._viewBox.y1);
16926
16899
  }
16927
16900
  get width() {
16928
16901
  return this.window.width;
@@ -16931,13 +16904,13 @@
16931
16904
  this.resize(w, this.height);
16932
16905
  }
16933
16906
  get viewWidth() {
16934
- return this.window.getViewBox().width();
16907
+ return this._viewBox.width();
16935
16908
  }
16936
16909
  set viewWidth(w) {
16937
16910
  this.resizeView(w, this.viewHeight);
16938
16911
  }
16939
16912
  get viewHeight() {
16940
- return this.window.getViewBox().height();
16913
+ return this._viewBox.height();
16941
16914
  }
16942
16915
  set viewHeight(h) {
16943
16916
  this.resizeView(this.viewWidth, h);
@@ -16971,13 +16944,7 @@
16971
16944
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
16972
16945
  var _a;
16973
16946
  super({}), this._onVisibleChange = visible => {
16974
- if (!(this._skipRender < 0)) if (visible) {
16975
- if (this.dirtyBounds) {
16976
- const b = this.window.getViewBox();
16977
- this.dirtyBounds.setValue(b.x1, b.y1, b.width(), b.height());
16978
- }
16979
- this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0;
16980
- } else this._skipRender = 1;
16947
+ this._skipRender < 0 || (visible ? (this.dirtyBounds && this.dirtyBounds.setValue(0, 0, this._viewBox.width(), this._viewBox.height()), this._skipRender > 1 && this.renderNextFrame(), this._skipRender = 0) : this._skipRender = 1);
16981
16948
  }, this.beforeRender = stage => {
16982
16949
  this._beforeRender && this._beforeRender(stage);
16983
16950
  }, this.afterRender = stage => {
@@ -16988,24 +16955,17 @@
16988
16955
  }, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.pluginService.active(this, params), this.window.create({
16989
16956
  width: params.width,
16990
16957
  height: params.height,
16991
- viewBox: params.viewBox,
16992
16958
  container: params.container,
16993
16959
  dpr: params.dpr || this.global.devicePixelRatio,
16994
16960
  canvasControled: !1 !== params.canvasControled,
16995
16961
  title: params.title || "",
16996
16962
  canvas: params.canvas
16997
- }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
16963
+ }), this._viewBox = new AABBBounds(), params.viewBox ? this._viewBox.setValue(params.viewBox.x1, params.viewBox.y1, params.viewBox.x2, params.viewBox.y2) : this._viewBox.setValue(0, 0, this.width, this.height), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._subView = !(this._viewBox.width() === this.width && this._viewBox.height() === this.height), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
16998
16964
  main: !0
16999
16965
  })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$2(this._background) && this._background.includes("/") && this.setAttributes({
17000
16966
  background: this._background
17001
16967
  });
17002
16968
  }
17003
- pauseRender() {
17004
- this._skipRender = -1;
17005
- }
17006
- resumeRender() {
17007
- this._skipRender = 0;
17008
- }
17009
16969
  tryInitEventSystem() {
17010
16970
  this.global.supportEvent && !this._eventSystem && (this._eventSystem = new EventSystem(Object.assign({
17011
16971
  targetElement: this.window,
@@ -17013,7 +16973,22 @@
17013
16973
  rootNode: this,
17014
16974
  global: this.global,
17015
16975
  supportsPointerEvents: this.params.supportsPointerEvents,
17016
- supportsTouchEvents: this.params.supportsTouchEvents
16976
+ supportsTouchEvents: this.params.supportsTouchEvents,
16977
+ viewport: {
16978
+ viewBox: this._viewBox,
16979
+ get x() {
16980
+ return this.viewBox.x1;
16981
+ },
16982
+ get y() {
16983
+ return this.viewBox.y1;
16984
+ },
16985
+ get width() {
16986
+ return this.viewBox.width();
16987
+ },
16988
+ get height() {
16989
+ return this.viewBox.height();
16990
+ }
16991
+ }
17017
16992
  }, this.params.event)));
17018
16993
  }
17019
16994
  preventRender(prevent) {
@@ -17160,7 +17135,7 @@
17160
17135
  return this.pluginService.findPluginsByName(name);
17161
17136
  }
17162
17137
  tryUpdateAABBBounds() {
17163
- const viewBox = this.window.getViewBox();
17138
+ const viewBox = this._viewBox;
17164
17139
  return this._AABBBounds.setValue(viewBox.x1, viewBox.y1, viewBox.x2, viewBox.y2), this._AABBBounds;
17165
17140
  }
17166
17141
  combineLayer(ILayer1, ILayer2) {
@@ -17187,12 +17162,12 @@
17187
17162
  this.supportInteractiveLayer && !this.interactiveLayer && (this.interactiveLayer = this.createLayer(), this.interactiveLayer.name = "_builtin_interactive", this.interactiveLayer.attribute.pickable = !1, this.nextFrameRenderLayerSet.add(this.interactiveLayer));
17188
17163
  }
17189
17164
  clearViewBox(color) {
17190
- this.window.clearViewBox(color);
17165
+ this.window.clearViewBox(this._viewBox, color);
17191
17166
  }
17192
17167
  render(layers, params) {
17193
17168
  this.ticker.start(), this.timeline.resume();
17194
17169
  const state = this.state;
17195
- this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this._skipRender || (this.renderLayerList(this.children), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear()), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
17170
+ this.state = "rendering", this.layerService.prepareStageLayer(this), this._skipRender || (this.lastRenderparams = params, this.hooks.beforeRender.call(this), this.renderLayerList(this.children, params), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear(), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
17196
17171
  }
17197
17172
  combineLayersToWindow() {}
17198
17173
  renderNextFrame(layers, force) {
@@ -17205,7 +17180,7 @@
17205
17180
  _doRenderInThisFrame() {
17206
17181
  this.timeline.resume(), this.ticker.start();
17207
17182
  const state = this.state;
17208
- this.state = "rendering", this.layerService.prepareStageLayer(this), this.nextFrameRenderLayerSet.size && !this._skipRender && (this.hooks.beforeRender.call(this), this._skipRender || (this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {}), this.combineLayersToWindow(), this.nextFrameRenderLayerSet.clear()), this.hooks.afterRender.call(this)), this.state = state, this._skipRender && this._skipRender++;
17183
+ this.state = "rendering", this.layerService.prepareStageLayer(this), this.nextFrameRenderLayerSet.size && !this._skipRender && (this.hooks.beforeRender.call(this), this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {}), this.combineLayersToWindow(), this.hooks.afterRender.call(this), this.nextFrameRenderLayerSet.clear()), this.state = state, this._skipRender && this._skipRender++;
17209
17184
  }
17210
17185
  renderLayerList(layerList, params) {
17211
17186
  const list = [];
@@ -17217,17 +17192,14 @@
17217
17192
  layer.renderCount > this.renderCount || (layer.renderCount = this.renderCount + 1, layer.render({
17218
17193
  renderService: this.renderService,
17219
17194
  background: layer === this.defaultLayer ? this.background : void 0,
17220
- updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty()),
17221
- viewBox: this.window.getViewBox(),
17222
- transMatrix: this.window.getViewBoxTransform()
17195
+ updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty())
17223
17196
  }, Object.assign({
17224
- renderStyle: this.renderStyle
17197
+ renderStyle: this.renderStyle,
17198
+ keepMatrix: this.params.renderKeepMatrix
17225
17199
  }, params)));
17226
17200
  }), this.interactiveLayer && !layerList.includes(this.interactiveLayer) && this.interactiveLayer.render({
17227
17201
  renderService: this.renderService,
17228
- updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty()),
17229
- viewBox: this.window.getViewBox(),
17230
- transMatrix: this.window.getViewBoxTransform()
17202
+ updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty())
17231
17203
  }, Object.assign({
17232
17204
  renderStyle: this.renderStyle
17233
17205
  }, params));
@@ -17238,9 +17210,9 @@
17238
17210
  }
17239
17211
  resize(w, h) {
17240
17212
  let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
17241
- this.window.hasSubView() || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.window.resize(w, h), this.forEachChildren(c => {
17213
+ this.window.resize(w, h), this.forEachChildren(c => {
17242
17214
  c.resize(w, h);
17243
- }), this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render();
17215
+ }), this._subView || this.viewBox.setValue(this.viewBox.x1, this.viewBox.y1, this.viewBox.x1 + w, this.viewBox.y1 + h), this.camera && this.option3d && this.set3dOptions(this.option3d), rerender && this.render();
17244
17216
  }
17245
17217
  resizeView(w, h) {
17246
17218
  let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
@@ -17294,41 +17266,47 @@
17294
17266
  getLayer(name) {
17295
17267
  return this.children.filter(layer => layer.name === name)[0];
17296
17268
  }
17297
- renderTo(window) {
17269
+ renderTo(window, params) {
17298
17270
  this.forEachChildren((layer, i) => {
17299
- layer.drawTo(window, {
17271
+ layer.drawTo(window, Object.assign(Object.assign({}, params), {
17300
17272
  renderService: this.renderService,
17301
- viewBox: window.getViewBox(),
17302
- transMatrix: window.getViewBoxTransform(),
17303
17273
  background: layer === this.defaultLayer ? this.background : void 0,
17304
17274
  clear: 0 === i,
17305
17275
  updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty())
17306
- });
17276
+ }));
17307
17277
  });
17308
17278
  }
17309
17279
  renderToNewWindow() {
17280
+ let fullImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
17310
17281
  let viewBox = arguments.length > 1 ? arguments[1] : undefined;
17311
- const window = container.get(VWindow),
17312
- x1 = viewBox ? -viewBox.x1 : 0,
17313
- y1 = viewBox ? -viewBox.y1 : 0,
17314
- x2 = viewBox ? viewBox.x2 : this.viewWidth,
17315
- y2 = viewBox ? viewBox.y2 : this.viewHeight,
17316
- width = viewBox ? viewBox.width() : this.viewWidth,
17317
- height = viewBox ? viewBox.height() : this.viewHeight;
17318
- return window.create({
17319
- viewBox: {
17320
- x1: x1,
17321
- y1: y1,
17322
- x2: x2,
17323
- y2: y2
17324
- },
17325
- width: width,
17326
- height: height,
17282
+ const window = container.get(VWindow);
17283
+ if (fullImage) window.create({
17284
+ width: this.viewWidth,
17285
+ height: this.viewHeight,
17327
17286
  dpr: this.window.dpr,
17328
17287
  canvasControled: !0,
17329
17288
  offscreen: !0,
17330
17289
  title: ""
17331
- }), this.renderTo(window), window;
17290
+ });else {
17291
+ const width = viewBox ? viewBox.width() : Math.min(this.viewWidth, this.window.width - this.x),
17292
+ height = viewBox ? viewBox.height() : Math.min(this.viewHeight, this.window.height - this.y);
17293
+ window.create({
17294
+ width: width,
17295
+ height: height,
17296
+ dpr: this.window.dpr,
17297
+ canvasControled: !0,
17298
+ offscreen: !0,
17299
+ title: ""
17300
+ });
17301
+ }
17302
+ const x = viewBox ? -viewBox.x1 : 0,
17303
+ y = viewBox ? -viewBox.y1 : 0;
17304
+ return this.renderTo(window, {
17305
+ x: x,
17306
+ y: y,
17307
+ width: viewBox ? viewBox.x2 : window.width,
17308
+ height: viewBox ? viewBox.y2 : window.height
17309
+ }), window;
17332
17310
  }
17333
17311
  toCanvas() {
17334
17312
  let fullImage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
@@ -17542,7 +17520,7 @@
17542
17520
  };
17543
17521
  let BaseWindowHandlerContribution = class {
17544
17522
  constructor() {
17545
- this._uid = Generator.GenAutoIncrementId(), this.viewBox = new AABBBounds(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
17523
+ this._uid = Generator.GenAutoIncrementId();
17546
17524
  }
17547
17525
  onChange(cb) {
17548
17526
  this._onChangeCb = cb;
@@ -17563,18 +17541,6 @@
17563
17541
  left: 0
17564
17542
  };
17565
17543
  }
17566
- setViewBox(vb) {
17567
- this.viewBox.setValue(vb.x1, vb.y1, vb.x2, vb.y2);
17568
- }
17569
- getViewBox() {
17570
- return this.viewBox;
17571
- }
17572
- setViewBoxTransform(a, b, c, d, e, f) {
17573
- this.modelMatrix.setValue(a, b, c, d, e, f);
17574
- }
17575
- getViewBoxTransform() {
17576
- return this.modelMatrix;
17577
- }
17578
17544
  };
17579
17545
  BaseWindowHandlerContribution = __decorate$K([injectable(), __metadata$x("design:paramtypes", [])], BaseWindowHandlerContribution);
17580
17546
 
@@ -17606,14 +17572,23 @@
17606
17572
  group: null
17607
17573
  };
17608
17574
  params.pickerService = this;
17609
- const w = params.bounds.width(),
17610
- h = params.bounds.height();
17611
- if (!new AABBBounds().setValue(0, 0, w, h).containsPoint(point)) return result;
17612
- this.pickContext && (this.pickContext.inuse = !0), params.pickContext = this.pickContext, this.pickContext && this.pickContext.clearMatrix(!0, 1);
17613
- const parentMatrix = new Matrix(1, 0, 0, 1, 0, 0);
17575
+ let offsetX = 0,
17576
+ offsetY = 0;
17577
+ if (params && params.bounds) {
17578
+ if (!params.bounds.contains(point.x, point.y)) return result;
17579
+ offsetX = params.bounds.x1, offsetY = params.bounds.y1;
17580
+ }
17581
+ if (this.pickContext) if (params.keepMatrix) {
17582
+ if (this.pickContext.nativeContext && this.pickContext.nativeContext.getTransform) {
17583
+ const t = this.pickContext.nativeContext.getTransform();
17584
+ this.pickContext.setTransformFromMatrix(t, !0, 1);
17585
+ }
17586
+ } else this.pickContext.inuse = !0, this.pickContext.clearMatrix(!0, 1);
17587
+ params.pickContext = this.pickContext;
17588
+ const parentMatrix = new Matrix(1, 0, 0, 1, offsetX, offsetY);
17614
17589
  let group;
17615
17590
  for (let i = graphics.length - 1; i >= 0 && (result = graphics[i].isContainer ? this.pickGroup(graphics[i], point, parentMatrix, params) : this.pickItem(graphics[i], point, parentMatrix, params), !result.graphic); i--) group || (group = result.group);
17616
- if (result.graphic || (result.group = group), this.pickContext && (this.pickContext.inuse = !1), result.graphic) {
17591
+ if (result.graphic || (result.group = group), this.pickContext && !params.keepMatrix && (this.pickContext.inuse = !1), result.graphic) {
17617
17592
  let g = result.graphic;
17618
17593
  for (; g.parent;) g = g.parent;
17619
17594
  g.shadowHost && (result.params = {
@@ -18667,6 +18642,7 @@
18667
18642
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
18668
18643
  };
18669
18644
  const outP = [0, 0, 0],
18645
+ initMatrix = new Matrix(1, 0, 0, 1, 0, 0),
18670
18646
  addArcToBezierPath = (bezierPath, startAngle, endAngle, cx, cy, rx, ry, clockwise) => {
18671
18647
  if (clockwise) for (; endAngle > startAngle;) endAngle -= pi2;else for (; endAngle < startAngle;) endAngle += pi2;
18672
18648
  const step = pi / 3 * (endAngle > startAngle ? 1 : -1);
@@ -18797,7 +18773,7 @@
18797
18773
  }), this._clearShadowStyle = !1, this._clearFilterStyle = !1, this._clearGlobalCompositeOperationStyle = !1;
18798
18774
  const context = canvas.nativeCanvas.getContext("2d");
18799
18775
  if (!context) throw new Error("发生错误,获取2d上下文失败");
18800
- this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = dpr, this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0), this._clearMatrix = new Matrix(1, 0, 0, 1, 0, 0);
18776
+ this.nativeContext = context, this.canvas = canvas, this.matrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack = [], this.dpr = dpr, this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0);
18801
18777
  }
18802
18778
  reset() {
18803
18779
  this.stack.length && Logger.getInstance().warn("可能存在bug,matrix没有清空"), this.matrix.setValue(1, 0, 0, 1, 0, 0), this.applyedMatrix = new Matrix(1, 0, 0, 1, 0, 0), this.stack.length = 0, this.nativeContext.setTransform(1, 0, 0, 1, 0, 0);
@@ -19159,10 +19135,7 @@
19159
19135
  clearMatrix() {
19160
19136
  let setTransform = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !0;
19161
19137
  let dpr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dpr;
19162
- this.setTransformFromMatrix(this._clearMatrix, setTransform, dpr);
19163
- }
19164
- setClearMatrix(a, b, c, d, e, f) {
19165
- this._clearMatrix.setValue(a, b, c, d, e, f);
19138
+ this.setTransformFromMatrix(initMatrix, setTransform, dpr);
19166
19139
  }
19167
19140
  onlyTranslate() {
19168
19141
  let dpr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dpr;
@@ -19393,7 +19366,7 @@
19393
19366
  return `${BrowserWindowHandlerContribution_1.idprefix}_${BrowserWindowHandlerContribution_1.prefix_count++}`;
19394
19367
  }
19395
19368
  constructor() {
19396
- super(), this.type = "browser", this._canvasIsIntersecting = !0, this.global = application.global, this.viewBox = new AABBBounds(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
19369
+ super(), this.type = "browser", this._canvasIsIntersecting = !0, this.global = application.global;
19397
19370
  }
19398
19371
  getTitle() {
19399
19372
  return this.canvas.id.toString();
@@ -19522,9 +19495,8 @@
19522
19495
  bottom: 0
19523
19496
  };
19524
19497
  }
19525
- clearViewBox(color) {
19526
- const vb = this.viewBox,
19527
- context = this.getContext(),
19498
+ clearViewBox(vb, color) {
19499
+ const context = this.getContext(),
19528
19500
  dpr = this.getDpr();
19529
19501
  context.nativeContext.save(), context.nativeContext.setTransform(dpr, 0, 0, dpr, 0, 0), context.clearRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1), color && (context.fillStyle = color, context.fillRect(vb.x1, vb.y1, vb.x2 - vb.x1, vb.y2 - vb.y1)), context.nativeContext.restore();
19530
19502
  }
@@ -19894,7 +19866,7 @@
19894
19866
  getBoundingClientRect() {
19895
19867
  return null;
19896
19868
  }
19897
- clearViewBox(color) {}
19869
+ clearViewBox(vb, color) {}
19898
19870
  };
19899
19871
  NodeWindowHandlerContribution.env = "node", NodeWindowHandlerContribution = __decorate$v([injectable(), __param$n(0, inject(VGlobal)), __metadata$n("design:paramtypes", [Object])], NodeWindowHandlerContribution);
19900
19872
  const nodeWindowModule = new ContainerModule(bind => {
@@ -25400,7 +25372,7 @@
25400
25372
  super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, Segment.defaultAttributes, attributes)), this.name = "segment";
25401
25373
  }
25402
25374
  render() {
25403
- this.removeAllChild(!0), this._reset();
25375
+ this.removeAllChild(), this._reset();
25404
25376
  const {
25405
25377
  startSymbol: startSymbol,
25406
25378
  endSymbol: endSymbol,
@@ -25669,7 +25641,7 @@
25669
25641
  return this.add(offscreenGroup), this._renderInner(offscreenGroup), this.removeChild(offscreenGroup), this.attribute = currentAttribute, offscreenGroup.AABBBounds;
25670
25642
  }
25671
25643
  render() {
25672
- this.removeAllChild(!0), this._prevInnerView = this._innerView, this._innerView = graphicCreator$1.group({
25644
+ this.removeAllChild(), this._prevInnerView = this._innerView, this._innerView = graphicCreator$1.group({
25673
25645
  x: 0,
25674
25646
  y: 0,
25675
25647
  pickable: !1
@@ -26657,7 +26629,7 @@
26657
26629
  this.attribute.disableTriggerEvent || (this.preHandler && (this.preHandler.addEventListener("pointerenter", this._onHover), this.preHandler.addEventListener("pointerleave", this._onUnHover), this.preHandler.addEventListener("pointerdown", this._onClick)), this.nextHandler && (this.nextHandler.addEventListener("pointerenter", this._onHover), this.nextHandler.addEventListener("pointerleave", this._onUnHover), this.nextHandler.addEventListener("pointerdown", this._onClick)));
26658
26630
  }
26659
26631
  _reset() {
26660
- this.removeAllChild(!0), this._current = 1, this._total = this.attribute.total, this.preHandler = this.nextHandler = this.text = null;
26632
+ this.removeAllChild(), this._current = 1, this._total = this.attribute.total, this.preHandler = this.nextHandler = this.text = null;
26661
26633
  }
26662
26634
  }
26663
26635
  Pager.defaultAttributes = {
@@ -26694,7 +26666,7 @@
26694
26666
  super(...arguments), this.name = "legend", this._title = null;
26695
26667
  }
26696
26668
  render() {
26697
- this.removeAllChild(!0);
26669
+ this.removeAllChild();
26698
26670
  const {
26699
26671
  interactive = !0,
26700
26672
  title: title,
@@ -28393,7 +28365,7 @@
28393
28365
  }
28394
28366
  render() {
28395
28367
  var _a, _b;
28396
- this.removeAllChild(!0);
28368
+ this.removeAllChild();
28397
28369
  const {
28398
28370
  layout = "horizontal",
28399
28371
  railWidth: railWidth,
@@ -29185,7 +29157,7 @@
29185
29157
  }, this.addEventListener("click", this.handleClick);
29186
29158
  }
29187
29159
  render() {
29188
- this.removeAllChild(!0), this.renderBox(), this.renderIcon(), this.renderText(), this.layout();
29160
+ this.removeAllChild(), this.renderBox(), this.renderIcon(), this.renderText(), this.layout();
29189
29161
  }
29190
29162
  renderBox() {
29191
29163
  this._box = new Rect$2(merge({}, this.attribute.box));
@@ -32631,7 +32603,7 @@
32631
32603
  super(params);
32632
32604
  this.numberType = CHART_NUMBER_TYPE;
32633
32605
  if (!params.chartInstance) {
32634
- params.chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
32606
+ params.chartInstance = this.chartInstance = new params.ClassType(params.spec, {
32635
32607
  renderCanvas: params.canvas,
32636
32608
  mode: this.attribute.mode === 'node' ? 'node' : 'desktop-browser',
32637
32609
  modeParams: this.attribute.modeParams,
@@ -32641,9 +32613,8 @@
32641
32613
  interactive: false,
32642
32614
  animation: false,
32643
32615
  autoFit: false
32644
- }));
32616
+ });
32645
32617
  this.chartInstance.renderSync();
32646
- this.chartInstance.getStage().enableDirtyBounds();
32647
32618
  }
32648
32619
  else {
32649
32620
  this.chartInstance = params.chartInstance;
@@ -32660,52 +32631,34 @@
32660
32631
  y1: y1 - table.scrollTop,
32661
32632
  y2: y2 - table.scrollTop
32662
32633
  });
32663
- this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
32634
+ this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, {
32664
32635
  renderCanvas: this.attribute.canvas,
32665
32636
  mode: 'desktop-browser',
32666
32637
  canvasControled: false,
32667
32638
  viewBox: {
32668
- x1: 0,
32669
- x2: x2 - x1,
32670
- y1: 0,
32671
- y2: y2 - y1
32639
+ x1: x1 - table.scrollLeft,
32640
+ x2: x2 - table.scrollLeft,
32641
+ y1: y1 - table.scrollTop,
32642
+ y2: y2 - table.scrollTop
32672
32643
  },
32673
32644
  dpr: table.internalProps.pixelRatio,
32674
32645
  animation: false,
32675
32646
  interactive: true,
32676
32647
  autoFit: false,
32677
- beforeRender: (chartStage) => {
32678
- const stage = this.stage;
32679
- const ctx = chartStage.window.getContext();
32680
- const stageMatrix = stage.window.getViewBoxTransform();
32681
- const viewBox = stage.window.getViewBox();
32648
+ beforeRender: (stage) => {
32649
+ const ctx = stage.window.getContext();
32682
32650
  ctx.inuse = true;
32683
32651
  ctx.clearMatrix();
32684
- ctx.setTransform(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f, true);
32685
- ctx.translate(viewBox.x1, viewBox.y1);
32686
32652
  ctx.setTransformForCurrent(true);
32687
32653
  ctx.beginPath();
32688
32654
  ctx.rect(clipBound.x1, clipBound.y1, clipBound.x2 - clipBound.x1, clipBound.y2 - clipBound.y1);
32689
32655
  ctx.clip();
32690
- ctx.clearMatrix();
32691
- if (!chartStage.needRender) {
32692
- chartStage.pauseRender();
32693
- table.scenegraph.stage.dirtyBounds.union(this.globalAABBBounds);
32694
- table.scenegraph.updateNextFrame();
32695
- }
32696
32656
  },
32697
32657
  afterRender(stage) {
32698
32658
  const ctx = stage.window.getContext();
32699
32659
  ctx.inuse = false;
32700
- stage.needRender = false;
32701
- chartStage.resumeRender();
32702
32660
  }
32703
- }));
32704
- const chartStage = this.activeChartInstance.getStage();
32705
- const matrix = this.globalTransMatrix.clone();
32706
- const stageMatrix = this.stage.window.getViewBoxTransform();
32707
- matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
32708
- chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
32661
+ });
32709
32662
  this.activeChartInstance.renderSync();
32710
32663
  table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(this.activeChartInstance);
32711
32664
  this.activeChartInstance.on('click', (params) => {
@@ -32741,12 +32694,11 @@
32741
32694
  const cellGroup = this.parent;
32742
32695
  const padding = this.attribute.cellPadding;
32743
32696
  const table = this.stage.table;
32744
- const { x1, y1, x2, y2 } = cellGroup.globalAABBBounds;
32745
32697
  return {
32746
- x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
32747
- x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (table.options.viewBox?.x1 ?? 0)),
32748
- y1: Math.ceil(y1 + padding[0] + table.scrollTop + (table.options.viewBox?.y1 ?? 0)),
32749
- y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (table.options.viewBox?.y1 ?? 0))
32698
+ x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),
32699
+ x2: Math.ceil(cellGroup.globalAABBBounds.x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft),
32700
+ y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),
32701
+ y2: Math.ceil(cellGroup.globalAABBBounds.y1 + cellGroup.attribute.height - padding[2] + table.scrollTop)
32750
32702
  };
32751
32703
  }
32752
32704
  }
@@ -32777,10 +32729,6 @@
32777
32729
  bodyBound.x1 = tableBound.x1 + table.getFrozenColsWidth();
32778
32730
  bodyBound.x2 = tableBound.x2 - table.getRightFrozenColsWidth();
32779
32731
  }
32780
- bodyBound.x1 = bodyBound.x1 + (table.options.viewBox?.x1 ?? 0);
32781
- bodyBound.x2 = bodyBound.x2 + (table.options.viewBox?.x1 ?? 0);
32782
- bodyBound.y1 = bodyBound.y1 + (table.options.viewBox?.y1 ?? 0);
32783
- bodyBound.y2 = bodyBound.y2 + (table.options.viewBox?.y1 ?? 0);
32784
32732
  return bodyBound;
32785
32733
  }
32786
32734
 
@@ -32838,8 +32786,7 @@
32838
32786
  data: table.getCellValue(col, row),
32839
32787
  cellPadding: padding,
32840
32788
  dpr: table.internalProps.pixelRatio,
32841
- axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : [],
32842
- tableChartOption: table.options.chartOption
32789
+ axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : []
32843
32790
  });
32844
32791
  cellGroup.appendChild(chartGroup);
32845
32792
  table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);
@@ -39189,65 +39136,48 @@
39189
39136
  if (viewBox.y2 <= viewBox.y1) {
39190
39137
  viewBox.y2 = viewBox.y1 + 1;
39191
39138
  }
39192
- chartInstance.updateViewBox({
39193
- x1: 0,
39194
- x2: viewBox.x2 - viewBox.x1,
39195
- y1: 0,
39196
- y2: viewBox.y2 - viewBox.y1
39197
- }, false, false);
39198
- const chartStage = chartInstance.getStage();
39199
- const matrix = chart.globalTransMatrix.clone();
39200
- const stageMatrix = chart.stage.window.getViewBoxTransform();
39201
- matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
39202
- chartStage.window.setViewBoxTransform &&
39203
- chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
39204
- const { table } = chart.getRootNode();
39205
- let updateSpec = false;
39206
- if (table.options.specFormat) {
39207
- const formatResult = table.options.specFormat(chart.attribute.spec);
39208
- if (formatResult.needFormatSpec && formatResult.spec) {
39209
- const spec = formatResult.spec;
39210
- chartInstance.updateSpecSync(spec);
39211
- updateSpec = true;
39212
- }
39213
- }
39214
- if (!updateSpec) {
39215
- axes?.forEach((axis, index) => {
39216
- if (axis.type === 'band') {
39217
- chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
39218
- }
39219
- else {
39220
- chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
39221
- }
39222
- });
39223
- table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
39224
- if (typeof dataId === 'string') {
39225
- chartInstance.updateDataSync(dataId, data ?? []);
39139
+ axes?.forEach((axis, index) => {
39140
+ if (axis.type === 'band') {
39141
+ chartInstance.updateModelSpec({ type: 'axes', index }, { domain: axis.domain.slice(0) }, true);
39226
39142
  }
39227
39143
  else {
39228
- const dataBatch = [];
39229
- for (const dataIdStr in dataId) {
39230
- const dataIdAndField = dataId[dataIdStr];
39231
- const series = spec.series.find((item) => item?.data?.id === dataIdStr);
39232
- dataBatch.push({
39233
- id: dataIdStr,
39234
- values: dataIdAndField
39235
- ? data?.filter((item) => {
39236
- return item.hasOwnProperty(dataIdAndField);
39237
- }) ?? []
39238
- : data ?? [],
39239
- fields: series?.data?.fields
39240
- });
39241
- if (!chartInstance.updateFullDataSync) {
39242
- chartInstance.updateDataSync(dataIdStr, dataIdAndField
39243
- ? data?.filter((item) => {
39244
- return item.hasOwnProperty(dataIdAndField);
39245
- }) ?? []
39246
- : data ?? []);
39247
- }
39144
+ chartInstance.updateModelSpecSync({ type: 'axes', index }, { min: axis.range?.min ?? 0, max: axis.range?.max ?? 0 }, true);
39145
+ }
39146
+ });
39147
+ chartInstance.updateViewBox({
39148
+ x1: viewBox.x1 - chart.getRootNode().table.scrollLeft,
39149
+ x2: viewBox.x2 - chart.getRootNode().table.scrollLeft,
39150
+ y1: viewBox.y1 - chart.getRootNode().table.scrollTop,
39151
+ y2: viewBox.y2 - chart.getRootNode().table.scrollTop
39152
+ }, false, false);
39153
+ const table = chart.getRootNode().table;
39154
+ table.internalProps.layoutMap?.updateDataStateToActiveChartInstance?.(chartInstance);
39155
+ if (typeof dataId === 'string') {
39156
+ chartInstance.updateDataSync(dataId, data ?? []);
39157
+ }
39158
+ else {
39159
+ const dataBatch = [];
39160
+ for (const dataIdStr in dataId) {
39161
+ const dataIdAndField = dataId[dataIdStr];
39162
+ const series = spec.series.find((item) => item?.data?.id === dataIdStr);
39163
+ dataBatch.push({
39164
+ id: dataIdStr,
39165
+ values: dataIdAndField
39166
+ ? data?.filter((item) => {
39167
+ return item.hasOwnProperty(dataIdAndField);
39168
+ }) ?? []
39169
+ : data ?? [],
39170
+ fields: series?.data?.fields
39171
+ });
39172
+ if (!chartInstance.updateFullDataSync) {
39173
+ chartInstance.updateDataSync(dataIdStr, dataIdAndField
39174
+ ? data?.filter((item) => {
39175
+ return item.hasOwnProperty(dataIdAndField);
39176
+ }) ?? []
39177
+ : data ?? []);
39248
39178
  }
39249
- chartInstance.updateFullDataSync?.(dataBatch);
39250
39179
  }
39180
+ chartInstance.updateFullDataSync?.(dataBatch);
39251
39181
  }
39252
39182
  const sg = chartInstance.getStage();
39253
39183
  cacheStageCanvas(sg, chart);
@@ -39304,7 +39234,7 @@
39304
39234
  }
39305
39235
 
39306
39236
  const ChartRender = Symbol.for('ChartRender');
39307
- let DefaultCanvasChartRender = class DefaultCanvasChartRender extends BaseRender {
39237
+ let DefaultCanvasChartRender = class DefaultCanvasChartRender {
39308
39238
  type;
39309
39239
  numberType = CHART_NUMBER_TYPE;
39310
39240
  drawShape(chart, context, x, y, drawContext, params, fillCb, strokeCb) {
@@ -39312,7 +39242,6 @@
39312
39242
  const { dataId, data, spec } = chart.attribute;
39313
39243
  chart.getViewBox();
39314
39244
  const { width = groupAttribute.width, height = groupAttribute.height } = chart.attribute;
39315
- const { table } = chart.getRootNode();
39316
39245
  const { chartInstance, active, cacheCanvas, activeChartInstance } = chart;
39317
39246
  if (!active && cacheCanvas) {
39318
39247
  if (isArray$1(cacheCanvas)) {
@@ -39326,27 +39255,6 @@
39326
39255
  }
39327
39256
  }
39328
39257
  else if (activeChartInstance) {
39329
- if (table.options.specFormat) {
39330
- const formatResult = table.options.specFormat(chart.attribute.spec);
39331
- if (formatResult.needFormatSpec && formatResult.spec) {
39332
- const spec = formatResult.spec;
39333
- activeChartInstance.updateSpecSync(spec);
39334
- return;
39335
- }
39336
- }
39337
- const viewBox = chart.getViewBox();
39338
- activeChartInstance.updateViewBox({
39339
- x1: 0,
39340
- x2: viewBox.x2 - viewBox.x1,
39341
- y1: 0,
39342
- y2: viewBox.y2 - viewBox.y1
39343
- }, false, false);
39344
- const chartStage = activeChartInstance.getStage();
39345
- chartStage.needRender = true;
39346
- const matrix = chart.globalTransMatrix.clone();
39347
- const stageMatrix = chart.stage.window.getViewBoxTransform();
39348
- matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f);
39349
- chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
39350
39258
  if (typeof dataId === 'string') {
39351
39259
  activeChartInstance.updateDataSync(dataId, data ?? []);
39352
39260
  }
@@ -39376,13 +39284,13 @@
39376
39284
  }
39377
39285
  }
39378
39286
  else {
39379
- if (table.internalProps.renderChartAsync) {
39287
+ if (chart.getRootNode().table.internalProps.renderChartAsync) {
39380
39288
  if (chartRenderKeys.indexOf(`${chart.parent.col}+${chart.parent.row}`) === -1) {
39381
39289
  chartRenderKeys.push(`${chart.parent.col}+${chart.parent.row}`);
39382
39290
  chartRenderQueueList.push(chart);
39383
39291
  }
39384
39292
  if (!IsHandlingChartQueue()) {
39385
- startRenderChartQueue(table);
39293
+ startRenderChartQueue(chart.getRootNode().table);
39386
39294
  }
39387
39295
  }
39388
39296
  else {
@@ -39391,7 +39299,31 @@
39391
39299
  }
39392
39300
  }
39393
39301
  draw(chart, renderService, drawContext, params) {
39394
- this._draw(chart, {}, false, drawContext, params);
39302
+ const { context } = drawContext;
39303
+ if (!context) {
39304
+ return;
39305
+ }
39306
+ const { clip } = chart.attribute;
39307
+ if (clip) {
39308
+ context.save();
39309
+ }
39310
+ else {
39311
+ context.highPerformanceSave();
39312
+ }
39313
+ context.transformFromMatrix(chart.transMatrix, true);
39314
+ context.beginPath();
39315
+ if (params.skipDraw) {
39316
+ this.drawShape(chart, context, 0, 0, drawContext, params, () => false, () => false);
39317
+ }
39318
+ else {
39319
+ this.drawShape(chart, context, 0, 0, drawContext);
39320
+ }
39321
+ if (clip) {
39322
+ context.restore();
39323
+ }
39324
+ else {
39325
+ context.highPerformanceRestore();
39326
+ }
39395
39327
  }
39396
39328
  };
39397
39329
  DefaultCanvasChartRender = __decorate([
@@ -39625,10 +39557,13 @@
39625
39557
  context.moveTo(x, y);
39626
39558
  context.lineTo(x + width, y);
39627
39559
  }
39628
- if ((isSplitDraw || isDash) && (!strokeArrayColor || strokeArrayColor[0])) {
39629
- if (strokeArrayColor) {
39560
+ if (isSplitDraw || isDash) {
39561
+ if (strokeArrayColor && strokeArrayColor[0]) {
39630
39562
  context.strokeStyle = strokeArrayColor[0];
39631
39563
  }
39564
+ else {
39565
+ context.strokeStyle = 'transparent';
39566
+ }
39632
39567
  if (!isWidthNumber) {
39633
39568
  context.lineWidth = strokeArrayWidth[0];
39634
39569
  }
@@ -39651,10 +39586,13 @@
39651
39586
  context.moveTo(x + width, y);
39652
39587
  context.lineTo(x + width, y + height);
39653
39588
  }
39654
- if ((isSplitDraw || isDash) && (!strokeArrayColor || strokeArrayColor[1])) {
39655
- if (strokeArrayColor) {
39589
+ if (isSplitDraw || isDash) {
39590
+ if (strokeArrayColor && strokeArrayColor[1]) {
39656
39591
  context.strokeStyle = strokeArrayColor[1];
39657
39592
  }
39593
+ else {
39594
+ context.strokeStyle = 'transparent';
39595
+ }
39658
39596
  if (!isWidthNumber) {
39659
39597
  context.lineWidth = strokeArrayWidth[1];
39660
39598
  }
@@ -39677,10 +39615,13 @@
39677
39615
  context.moveTo(x, y + height);
39678
39616
  context.lineTo(x + width, y + height);
39679
39617
  }
39680
- if ((isSplitDraw || isDash) && (!strokeArrayColor || strokeArrayColor[2])) {
39681
- if (strokeArrayColor) {
39618
+ if (isSplitDraw || isDash) {
39619
+ if (strokeArrayColor && strokeArrayColor[2]) {
39682
39620
  context.strokeStyle = strokeArrayColor[2];
39683
39621
  }
39622
+ else {
39623
+ context.strokeStyle = 'transparent';
39624
+ }
39684
39625
  if (!isWidthNumber) {
39685
39626
  context.lineWidth = strokeArrayWidth[2];
39686
39627
  }
@@ -39703,10 +39644,13 @@
39703
39644
  context.moveTo(x, y);
39704
39645
  context.lineTo(x, y + height);
39705
39646
  }
39706
- if ((isSplitDraw || isDash) && (!strokeArrayColor || strokeArrayColor[3])) {
39707
- if (strokeArrayColor) {
39647
+ if (isSplitDraw || isDash) {
39648
+ if (strokeArrayColor && strokeArrayColor[3]) {
39708
39649
  context.strokeStyle = strokeArrayColor[3];
39709
39650
  }
39651
+ else {
39652
+ context.strokeStyle = 'transparent';
39653
+ }
39710
39654
  if (!isWidthNumber) {
39711
39655
  context.lineWidth = strokeArrayWidth[3];
39712
39656
  }
@@ -43267,15 +43211,6 @@
43267
43211
  });
43268
43212
  }
43269
43213
  }
43270
- function clearCellChartCacheImage(col, row, scenegraph) {
43271
- const cellGroup = scenegraph.getCell(col, row);
43272
- cellGroup.children.forEach((node) => {
43273
- if (node.type === 'chart') {
43274
- node.cacheCanvas = null;
43275
- node.addUpdateBoundTag();
43276
- }
43277
- });
43278
- }
43279
43214
  function updateChartData(scenegraph) {
43280
43215
  const table = scenegraph.table;
43281
43216
  for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
@@ -44220,12 +44155,7 @@
44220
44155
  setPoptipTheme(this.table.theme.textPopTipStyle);
44221
44156
  let width;
44222
44157
  let height;
44223
- if (table.options.canvas && table.options.viewBox) {
44224
- vglobal.setEnv('browser');
44225
- width = table.options.viewBox.x2 - table.options.viewBox.x1;
44226
- height = table.options.viewBox.y2 - table.options.viewBox.y1;
44227
- }
44228
- else if (Env.mode === 'node') {
44158
+ if (Env.mode === 'node') {
44229
44159
  vglobal.setEnv('node', table.options.modeParams);
44230
44160
  width = table.canvasWidth;
44231
44161
  height = table.canvasHeight;
@@ -44243,15 +44173,9 @@
44243
44173
  background: table.theme.underlayBackgroundColor,
44244
44174
  dpr: table.internalProps.pixelRatio,
44245
44175
  enableLayout: true,
44246
- beforeRender: (stage) => {
44247
- this.table.options.beforeRender && this.table.options.beforeRender(stage);
44248
- },
44249
- afterRender: (stage) => {
44250
- this.table.options.afterRender && this.table.options.afterRender(stage);
44176
+ afterRender: () => {
44251
44177
  this.table.fireListeners('after_render', null);
44252
- },
44253
- canvasControled: !table.options.canvas,
44254
- viewBox: table.options.viewBox
44178
+ }
44255
44179
  });
44256
44180
  this.stage.defaultLayer.setTheme({
44257
44181
  group: {
@@ -45130,7 +45054,11 @@
45130
45054
  this.updateTableSize();
45131
45055
  const isListTableWithFrozen = !this.isPivot;
45132
45056
  createFrameBorder(this.bodyGroup, this.table.theme.bodyStyle.frameStyle, this.bodyGroup.role, isListTableWithFrozen ? [true, true, true, false] : undefined);
45133
- createFrameBorder(this.rowHeaderGroup, this.isPivot ? this.table.theme.rowHeaderStyle.frameStyle : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
45057
+ createFrameBorder(this.rowHeaderGroup, this.isPivot
45058
+ ? this.table.theme.rowHeaderStyle.frameStyle
45059
+ : this.table.internalProps.transpose
45060
+ ? this.table.theme.headerStyle.frameStyle
45061
+ : this.table.theme.bodyStyle.frameStyle, this.rowHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
45134
45062
  createFrameBorder(this.colHeaderGroup, this.table.theme.headerStyle.frameStyle, this.colHeaderGroup.role, isListTableWithFrozen ? [true, true, true, false] : undefined);
45135
45063
  createFrameBorder(this.cornerHeaderGroup, this.isPivot ? this.table.theme.cornerHeaderStyle.frameStyle : this.table.theme.headerStyle.frameStyle, this.cornerHeaderGroup.role, isListTableWithFrozen ? [true, false, true, true] : undefined);
45136
45064
  createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, undefined);
@@ -47289,8 +47217,8 @@
47289
47217
  function getCellEventArgsSet(e) {
47290
47218
  const tableEvent = {
47291
47219
  abstractPos: {
47292
- x: e.viewport.x,
47293
- y: e.viewport.y
47220
+ x: e.x,
47221
+ y: e.y
47294
47222
  }
47295
47223
  };
47296
47224
  const targetCell = getTargetCell(e.target);
@@ -48237,14 +48165,12 @@
48237
48165
  e.preventDefault();
48238
48166
  }
48239
48167
  });
48240
- if (!table.options.canvas) {
48241
- handler.on(table.getContainer(), 'resize', e => {
48242
- if (e.width === 0 && e.height === 0) {
48243
- return;
48244
- }
48245
- table.resize();
48246
- });
48247
- }
48168
+ handler.on(table.getContainer(), 'resize', e => {
48169
+ if (e.width === 0 && e.height === 0) {
48170
+ return;
48171
+ }
48172
+ table.resize();
48173
+ });
48248
48174
  }
48249
48175
 
48250
48176
  function bindTouchListener(eventManager) {
@@ -48500,7 +48426,7 @@
48500
48426
  isDraging = false;
48501
48427
  constructor(table) {
48502
48428
  this.table = table;
48503
- if (Env.mode === 'node' || table.options.disableInteraction) {
48429
+ if (Env.mode === 'node') {
48504
48430
  return;
48505
48431
  }
48506
48432
  this.bindOuterEvent();
@@ -51812,7 +51738,7 @@
51812
51738
  return TABLE_EVENT_TYPE;
51813
51739
  }
51814
51740
  options;
51815
- version = "0.19.2-alpha.1";
51741
+ version = "0.19.2-alpha.2";
51816
51742
  pagination;
51817
51743
  id = `VTable${Date.now()}`;
51818
51744
  headerStyleCache;
@@ -51823,7 +51749,7 @@
51823
51749
  _chartEventMap = {};
51824
51750
  constructor(container, options = {}) {
51825
51751
  super();
51826
- if (!container && options.mode !== 'node' && !options.canvas) {
51752
+ if (!container && options.mode !== 'node') {
51827
51753
  throw new Error("vtable's container is undefined");
51828
51754
  }
51829
51755
  const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, eventOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth } = options;
@@ -51859,14 +51785,7 @@
51859
51785
  if (typeof allowFrozenColCount === 'number' && allowFrozenColCount <= 0) {
51860
51786
  this.showFrozenIcon = false;
51861
51787
  }
51862
- if (this.options.canvas) {
51863
- internalProps.element = this.options.canvas.parentElement;
51864
- internalProps.element.style.position = 'relative';
51865
- internalProps.focusControl = new FocusInput(this, internalProps.element);
51866
- internalProps.canvas = this.options.canvas;
51867
- internalProps.context = internalProps.canvas.getContext('2d');
51868
- }
51869
- else if (Env.mode !== 'node') {
51788
+ if (Env.mode !== 'node') {
51870
51789
  internalProps.element = createRootElement(this.padding);
51871
51790
  internalProps.focusControl = new FocusInput(this, internalProps.element);
51872
51791
  internalProps.canvas = document.createElement('canvas');
@@ -52202,21 +52121,7 @@
52202
52121
  const { padding } = this;
52203
52122
  let widthP = 0;
52204
52123
  let heightP = 0;
52205
- this.tableX = 0;
52206
- this.tableY = 0;
52207
- if (this.options.canvas && this.options.viewBox) {
52208
- widthP = this.options.viewBox.x2 - this.options.viewBox.x1;
52209
- heightP = this.options.viewBox.y2 - this.options.viewBox.y1;
52210
- if (this?.scenegraph?.stage) {
52211
- if (this.options.viewBox) {
52212
- this.scenegraph.stage.setViewBox(this.options.viewBox, false);
52213
- }
52214
- else {
52215
- this.scenegraph.stage.resize(widthP, heightP);
52216
- }
52217
- }
52218
- }
52219
- else if (Env.mode === 'browser') {
52124
+ if (Env.mode === 'browser') {
52220
52125
  const element = this.getElement();
52221
52126
  const width1 = element.parentElement?.offsetWidth ?? 1 - 1;
52222
52127
  const height1 = element.parentElement?.offsetHeight ?? 1 - 1;
@@ -52246,35 +52151,13 @@
52246
52151
  if (this.internalProps.theme?.frameStyle) {
52247
52152
  const lineWidths = toBoxArray(this.internalProps.theme.frameStyle?.borderLineWidth ?? [null]);
52248
52153
  const shadowWidths = toBoxArray(this.internalProps.theme.frameStyle?.shadowBlur ?? [0]);
52249
- this.tableX += (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
52250
- this.tableY += (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
52154
+ this.tableX = (lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0);
52155
+ this.tableY = (lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0);
52251
52156
  this.tableNoFrameWidth =
52252
52157
  width - ((lineWidths[1] ?? 0) + (shadowWidths[1] ?? 0)) - ((lineWidths[3] ?? 0) + (shadowWidths[3] ?? 0));
52253
52158
  this.tableNoFrameHeight =
52254
52159
  height - ((lineWidths[0] ?? 0) + (shadowWidths[0] ?? 0)) - ((lineWidths[2] ?? 0) + (shadowWidths[2] ?? 0));
52255
52160
  }
52256
- else {
52257
- this.tableX += 0;
52258
- this.tableY += 0;
52259
- this.tableNoFrameWidth = width;
52260
- this.tableNoFrameHeight = height;
52261
- }
52262
- }
52263
- updateViewBox(newViewBox) {
52264
- const oldWidth = this.options?.viewBox.x2 ?? 0 - this.options?.viewBox.x1 ?? 0;
52265
- const oldHeight = this.options?.viewBox.y2 ?? 0 - this.options?.viewBox.y1 ?? 0;
52266
- const newWidth = newViewBox.x2 - newViewBox.x1;
52267
- const newHeight = newViewBox.y2 - newViewBox.y1;
52268
- this.options.viewBox = newViewBox;
52269
- if (oldWidth !== newWidth || oldHeight !== newHeight) {
52270
- this.resize();
52271
- }
52272
- else {
52273
- this.scenegraph.stage.setViewBox(this.options.viewBox, true);
52274
- }
52275
- }
52276
- setViewBoxTransform(a, b, c, d, e, f) {
52277
- this.scenegraph.stage.window.setViewBoxTransform(a, b, c, d, e, f);
52278
52161
  }
52279
52162
  get rowHierarchyType() {
52280
52163
  return 'grid';
@@ -52770,8 +52653,6 @@
52770
52653
  const visibleRect = this.getVisibleRect();
52771
52654
  rect.offsetLeft(this.tableX - (relativeX ? visibleRect.left : 0));
52772
52655
  rect.offsetTop(this.tableY - (relativeY ? visibleRect.top : 0));
52773
- rect.offsetLeft(this.options.viewBox?.x1 ?? 0);
52774
- rect.offsetTop(this.options.viewBox?.y1 ?? 0);
52775
52656
  return rect;
52776
52657
  }
52777
52658
  getVisibleRect() {
@@ -52926,7 +52807,7 @@
52926
52807
  this.scenegraph.stage.release();
52927
52808
  this.scenegraph.proxy.release();
52928
52809
  const { parentElement } = internalProps.element;
52929
- if (parentElement && !this.options.canvas) {
52810
+ if (parentElement) {
52930
52811
  parentElement.removeChild(internalProps.element);
52931
52812
  }
52932
52813
  this.isReleased = true;
@@ -53099,8 +52980,8 @@
53099
52980
  const currentHeight = rect.height;
53100
52981
  const originHeight = this.canvas.offsetHeight || currentHeight;
53101
52982
  const heightRatio = currentHeight / originHeight;
53102
- const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0) - (this.options.viewBox?.x1 ?? 0);
53103
- const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0) - (this.options.viewBox?.y1 ?? 0);
52983
+ const x = (clientX - rect.left) / widthRatio + (isAddScroll ? table.scrollLeft : 0);
52984
+ const y = (clientY - rect.top) / heightRatio + (isAddScroll ? table.scrollTop : 0);
53104
52985
  return { x, y, inTable };
53105
52986
  }
53106
52987
  getTheme() {
@@ -53584,15 +53465,24 @@
53584
53465
  }, styleClass, this.options.autoWrapText);
53585
53466
  }
53586
53467
  else {
53468
+ let defaultStyle;
53469
+ if (layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)) {
53470
+ defaultStyle = this.theme.headerStyle;
53471
+ }
53472
+ else if (this.internalProps.transpose && layoutMap.isRowHeader(col, row)) {
53473
+ defaultStyle = this.theme.headerStyle;
53474
+ }
53475
+ else if (layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)) {
53476
+ defaultStyle = this.theme.rowHeaderStyle;
53477
+ }
53478
+ else {
53479
+ defaultStyle = this.theme.cornerHeaderStyle;
53480
+ }
53587
53481
  const style = hd?.style || {};
53588
53482
  if (paddingForAxis) {
53589
53483
  style.padding = paddingForAxis;
53590
53484
  }
53591
- cacheStyle = of$1(style, layoutMap.isColumnHeader(col, row) || layoutMap.isBottomFrozenRow(col, row)
53592
- ? this.theme.headerStyle
53593
- : layoutMap.isRowHeader(col, row) || layoutMap.isRightFrozenColumn(col, row)
53594
- ? this.theme.rowHeaderStyle
53595
- : this.theme.cornerHeaderStyle, {
53485
+ cacheStyle = of$1(style, defaultStyle, {
53596
53486
  col,
53597
53487
  row,
53598
53488
  table: this,
@@ -62583,14 +62473,6 @@
62583
62473
  updateChartData(this.scenegraph);
62584
62474
  this.render();
62585
62475
  }
62586
- clearChartCacheImage(col, row) {
62587
- if (isNumber$2(col) && isNumber$2(row)) {
62588
- clearCellChartCacheImage(col, row, this.scenegraph);
62589
- }
62590
- else {
62591
- clearChartCacheImage(this.scenegraph);
62592
- }
62593
- }
62594
62476
  getLegendSelected() {
62595
62477
  return this.internalProps.legends.legendComponent._getSelectedLegends().map((d) => d.label);
62596
62478
  }
@@ -63287,7 +63169,7 @@
63287
63169
  }
63288
63170
 
63289
63171
  registerForVrender();
63290
- const version = "0.19.2-alpha.1";
63172
+ const version = "0.19.2-alpha.2";
63291
63173
  function getIcons() {
63292
63174
  return get$1();
63293
63175
  }