@visactor/vtable-calendar 1.11.6-alpha.2 → 1.11.6-alpha.3

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.
@@ -45576,7 +45576,7 @@
45576
45576
  constructor(container) {
45577
45577
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45578
45578
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45579
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.2", 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");
45579
+ if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-alpha.3", 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");
45580
45580
  const {
45581
45581
  frozenColCount = 0,
45582
45582
  frozenRowCount: frozenRowCount,
@@ -49669,7 +49669,7 @@
49669
49669
  }
49670
49670
  _refreshHierarchyState(col, row) {
49671
49671
  let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
49672
- var _a, _b, _c;
49672
+ var _a;
49673
49673
  let notFillWidth = !1,
49674
49674
  notFillHeight = !1;
49675
49675
  const checkHasChart = this.internalProps.layoutMap.checkHasChart();
@@ -49694,7 +49694,7 @@
49694
49694
  });
49695
49695
  diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
49696
49696
  }
49697
- null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49697
+ this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49698
49698
  }
49699
49699
  _hasHierarchyTreeHeader() {
49700
49700
  var _a, _b;
@@ -50699,21 +50699,19 @@
50699
50699
  disableTriggerEvent: this.table.options.disableInteraction
50700
50700
  }));
50701
50701
  legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
50702
- maxWidth: 0,
50703
- width: 0,
50704
- maxHeight: 0,
50705
- height: 0,
50706
- clip: !0
50702
+ visible: !1,
50703
+ visibleAll: !1
50707
50704
  }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50708
50705
  }
50709
50706
  resize() {
50710
- this.legendComponent && (this.legendComponent.setAttributes({
50707
+ this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
50711
50708
  maxWidth: this.table.tableNoFrameWidth,
50712
50709
  maxHeight: this.table.tableNoFrameHeight
50713
50710
  }), this.adjustTableSize(this.legendComponent.attribute));
50714
50711
  }
50715
50712
  adjustTableSize(attrs) {
50716
50713
  var _a, _b;
50714
+ if (!this.legendComponent || !1 === this.visible) return;
50717
50715
  let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
50718
50716
  height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
50719
50717
  if (width <= 0 || height <= 0) return;
@@ -50948,16 +50946,20 @@
50948
50946
  slidable: !0
50949
50947
  })) : new SizeContinuousLegend(merge({}, attrs, {
50950
50948
  slidable: !0
50951
- })), legend.name = "legend", this.legendComponent = legend, this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50949
+ })), legend.name = "legend", this.legendComponent = legend, !1 === this.visible && (legend.setAttributes({
50950
+ visible: !1,
50951
+ visibleAll: !1
50952
+ }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
50952
50953
  }
50953
50954
  resize() {
50954
- this.legendComponent && (this.legendComponent.setAttributes({
50955
+ this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
50955
50956
  width: this.table.tableNoFrameWidth,
50956
50957
  height: this.table.tableNoFrameHeight
50957
50958
  }), this.adjustTableSize(this.legendComponent.attribute));
50958
50959
  }
50959
50960
  adjustTableSize(attrs) {
50960
50961
  var _a, _b;
50962
+ if (!this.legendComponent || !1 === this.visible) return;
50961
50963
  let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0,
50962
50964
  height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;
50963
50965
  if (width <= 0 || height <= 0) return;