@visactor/vtable 1.11.6-alpha.7 → 1.11.6-alpha.8

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.
@@ -86,7 +86,7 @@ export class BaseTable extends EventTarget {
86
86
  }
87
87
  constructor(container, options = {}) {
88
88
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
89
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.7", this.id = `VTable${Date.now()}`,
89
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.8", this.id = `VTable${Date.now()}`,
90
90
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
91
91
  !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
92
92
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
@@ -1653,8 +1653,11 @@ export class BaseTable extends EventTarget {
1653
1653
  this.render();
1654
1654
  const stage = this.scenegraph.stage;
1655
1655
  if (stage) {
1656
- const contentWidth = this.tableX + this.getAllColsWidth(), contentHeight = this.tableY + this.getAllRowsHeight();
1657
- if (contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
1656
+ let contentWidth = this.tableX + this.getAllColsWidth(), contentHeight = this.tableY + this.getAllRowsHeight();
1657
+ if (this.internalProps.legends && this.internalProps.legends.forEach((legend => {
1658
+ "right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
1659
+ })), 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))),
1660
+ contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
1658
1661
  stage.render();
1659
1662
  return stage.window.getImageBuffer(type);
1660
1663
  }