@visactor/vtable 1.1.3-alpha.0 → 1.1.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/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +8 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/core/BaseTable.js +13 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +2 -1
- package/cjs/event/EventHandler.js +6 -3
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/listener/container-dom.js +3 -2
- package/cjs/event/listener/container-dom.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/scenegraph/graphic/contributions/group-contribution-render.js +16 -24
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +2 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +2 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/utils/break-string.js +2 -3
- package/cjs/scenegraph/utils/break-string.js.map +1 -1
- package/cjs/tools/pixel-ratio.d.ts +1 -0
- package/cjs/tools/pixel-ratio.js +6 -5
- package/cjs/tools/pixel-ratio.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +1 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +64 -60
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +13 -7
- package/es/ListTable.js.map +1 -1
- package/es/core/BaseTable.js +13 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/EventHandler.d.ts +2 -1
- package/es/event/EventHandler.js +6 -3
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/listener/container-dom.js +4 -1
- package/es/event/listener/container-dom.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/scenegraph/graphic/contributions/group-contribution-render.js +16 -24
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +2 -2
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +2 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/utils/break-string.js +1 -4
- package/es/scenegraph/utils/break-string.js.map +1 -1
- package/es/tools/pixel-ratio.d.ts +1 -0
- package/es/tools/pixel-ratio.js +5 -4
- package/es/tools/pixel-ratio.js.map +1 -1
- package/es/ts-types/base-table.d.ts +1 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
package/cjs/core/BaseTable.js
CHANGED
|
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
45
45
|
}
|
|
46
46
|
constructor(container, options = {}) {
|
|
47
47
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.1.3-alpha.
|
|
48
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.1.3-alpha.2", this.id = `VTable${Date.now()}`,
|
|
49
49
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
50
50
|
!container && "node" !== options.mode) throw new Error("vtable's container is undefined");
|
|
51
51
|
const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, autoFillHeight: autoFillHeight = !1, widthAdaptiveMode: widthAdaptiveMode = "only-body", heightAdaptiveMode: heightAdaptiveMode = "only-body", keyboardOptions: keyboardOptions, eventOptions: eventOptions, rowSeriesNumber: rowSeriesNumber, columnResizeMode: columnResizeMode, rowResizeMode: rowResizeMode = "none", dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount, mode: mode, modeParams: modeParams, canvasWidth: canvasWidth, canvasHeight: canvasHeight, overscrollBehavior: overscrollBehavior, limitMinWidth: limitMinWidth, limitMinHeight: limitMinHeight, clearDOM: clearDOM = !0} = options;
|
|
@@ -324,7 +324,17 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
324
324
|
return Math.max((0, tableHelper_1._applyColWidthLimits)(limits, orgWidth), 0);
|
|
325
325
|
}
|
|
326
326
|
setPixelRatio(pixelRatio) {
|
|
327
|
-
|
|
327
|
+
if (pixelRatio !== this.internalProps.pixelRatio) {
|
|
328
|
+
this.internalProps.pixelRatio = pixelRatio;
|
|
329
|
+
const canvasWidth = this.options.canvasWidth;
|
|
330
|
+
this.internalProps.calcWidthContext = {
|
|
331
|
+
_: this.internalProps,
|
|
332
|
+
get full() {
|
|
333
|
+
var _a;
|
|
334
|
+
return "node" === env_1.Env.mode ? canvasWidth / (null != pixelRatio ? pixelRatio : 1) : this._.canvas.width / (null !== (_a = this._.context.pixelRatio) && void 0 !== _a ? _a : window.devicePixelRatio);
|
|
335
|
+
}
|
|
336
|
+
}, this.scenegraph.setPixelRatio(pixelRatio);
|
|
337
|
+
}
|
|
328
338
|
}
|
|
329
339
|
_updateSize() {
|
|
330
340
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;
|
|
@@ -1136,8 +1146,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1136
1146
|
return this.internalProps.context;
|
|
1137
1147
|
}
|
|
1138
1148
|
getRecordByCell(col, row) {
|
|
1139
|
-
|
|
1140
|
-
if (!this.internalProps.layoutMap.isHeader(col, row)) return null === (_a = this.internalProps.dataSource) || void 0 === _a ? void 0 : _a.get(this.getRecordShowIndexByCell(col, row));
|
|
1149
|
+
if (!this.internalProps.layoutMap.isHeader(col, row)) return this.getCellOriginRecord(col, row);
|
|
1141
1150
|
}
|
|
1142
1151
|
getRecordByRowCol(col, row) {
|
|
1143
1152
|
return this.getRecordByCell(col, row);
|