@visactor/vtable 1.17.7-alpha.0 → 1.17.7-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.
@@ -90,7 +90,7 @@ export class BaseTable extends EventTarget {
90
90
  }
91
91
  constructor(container, options = {}) {
92
92
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
93
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.7-alpha.0", this.id = `VTable${Date.now()}`,
93
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.7-alpha.2", this.id = `VTable${Date.now()}`,
94
94
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
95
95
  !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
96
96
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
@@ -1747,8 +1747,11 @@ export class BaseTable extends EventTarget {
1747
1747
  this.render();
1748
1748
  const stage = this.scenegraph.stage;
1749
1749
  if (stage) {
1750
- const contentWidth = this.tableX + this.getAllColsWidth(), contentHeight = this.tableY + this.getAllRowsHeight();
1751
- if (contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
1750
+ let contentWidth = this.tableX + this.getAllColsWidth(), contentHeight = this.tableY + this.getAllRowsHeight();
1751
+ if (this.internalProps.legends && this.internalProps.legends.forEach((legend => {
1752
+ "right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
1753
+ })), this.internalProps.title && ("right" === this.internalProps.title._titleOption.orient ? contentWidth = Math.max(contentWidth, this.internalProps.title.getComponentGraphic().globalAABBBounds.x2) : "bottom" === this.internalProps.title._titleOption.orient && (contentHeight = Math.max(contentHeight, this.internalProps.title.getComponentGraphic().globalAABBBounds.y2))),
1754
+ contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
1752
1755
  stage.render();
1753
1756
  return stage.window.getImageBuffer(type);
1754
1757
  }