@visactor/vtable 1.18.3-alpha.0 → 1.18.3-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.
- package/cjs/core/BaseTable.js +6 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +2 -2
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +25 -7
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +6 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +2 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +2 -2
package/es/core/BaseTable.js
CHANGED
|
@@ -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.18.3-alpha.
|
|
93
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.18.3-alpha.2", this.id = `VTable${Date.now()}`,
|
|
94
94
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200),
|
|
95
95
|
"node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
|
|
96
96
|
container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
@@ -1768,8 +1768,11 @@ export class BaseTable extends EventTarget {
|
|
|
1768
1768
|
this.render();
|
|
1769
1769
|
const stage = this.scenegraph.stage;
|
|
1770
1770
|
if (stage) {
|
|
1771
|
-
|
|
1772
|
-
if (
|
|
1771
|
+
let contentWidth = this.tableX + this.getAllColsWidth(), contentHeight = this.tableY + this.getAllRowsHeight();
|
|
1772
|
+
if (this.internalProps.legends && this.internalProps.legends.forEach((legend => {
|
|
1773
|
+
"right" === legend.orient ? contentWidth = Math.max(contentWidth, legend.legendComponent.globalAABBBounds.x2) : "bottom" === legend.orient && (contentHeight = Math.max(contentHeight, legend.legendComponent.globalAABBBounds.y2));
|
|
1774
|
+
})), 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))),
|
|
1775
|
+
contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
|
|
1773
1776
|
stage.render();
|
|
1774
1777
|
return stage.window.getImageBuffer(type);
|
|
1775
1778
|
}
|