@visactor/vtable-calendar 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.
@@ -45609,7 +45609,7 @@
45609
45609
  constructor(container) {
45610
45610
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45611
45611
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
45612
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.7", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
45612
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
45613
45613
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
45614
45614
  const {
45615
45615
  frozenColCount = 0,
@@ -47260,9 +47260,11 @@
47260
47260
  this.render();
47261
47261
  const stage = this.scenegraph.stage;
47262
47262
  if (stage) {
47263
- const contentWidth = this.tableX + this.getAllColsWidth(),
47263
+ let contentWidth = this.tableX + this.getAllColsWidth(),
47264
47264
  contentHeight = this.tableY + this.getAllRowsHeight();
47265
- if (contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
47265
+ if (this.internalProps.legends && this.internalProps.legends.forEach(legend => {
47266
+ "right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
47267
+ }), 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))), contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
47266
47268
  stage.render();
47267
47269
  return stage.window.getImageBuffer(type);
47268
47270
  }