@visactor/vtable 0.10.1-alpha.1 → 0.10.1-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.
- package/README.md +1 -2
- package/cjs/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +9 -7
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +4 -4
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +4 -4
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/components/axis/axis.js +3 -3
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +0 -2
- package/cjs/components/axis/get-axis-attributes.js +1 -3
- package/cjs/components/axis/get-axis-attributes.js.map +1 -1
- package/cjs/components/axis/get-axis-component-size.js +33 -65
- package/cjs/components/axis/get-axis-component-size.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +7 -3
- package/cjs/core/BaseTable.js +39 -20
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.js +9 -11
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/drill.js.map +1 -1
- package/cjs/event/listener/table-group.js +1 -1
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/header-helper/header-helper.js +1 -3
- package/cjs/header-helper/header-helper.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/chart-helper/get-axis-config.js +2 -2
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +11 -11
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js +25 -25
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +5 -6
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +2 -15
- package/cjs/scenegraph/graphic/text.js +6 -139
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +10 -8
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/column-helper.js +3 -8
- package/cjs/scenegraph/group-creater/column-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +8 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +3 -1
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/state/spark-line/index.js +1 -1
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.d.ts +2 -2
- package/cjs/state/state.js +3 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +4 -3
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.d.ts +1 -1
- package/cjs/ts-types/common.js.map +1 -1
- package/cjs/ts-types/events.d.ts +1 -1
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -2
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +1 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/dist/vtable.js +7148 -4554
- package/dist/vtable.min.js +3 -3
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +9 -7
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +4 -4
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +4 -4
- package/es/PivotTable.js.map +1 -1
- package/es/components/axis/axis.js +2 -2
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/get-axis-attributes.d.ts +0 -2
- package/es/components/axis/get-axis-attributes.js +1 -3
- package/es/components/axis/get-axis-attributes.js.map +1 -1
- package/es/components/axis/get-axis-component-size.js +33 -65
- package/es/components/axis/get-axis-component-size.js.map +1 -1
- package/es/core/BaseTable.d.ts +7 -3
- package/es/core/BaseTable.js +35 -17
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.js +9 -11
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/drill.js.map +1 -1
- package/es/event/listener/table-group.js +1 -1
- package/es/event/listener/table-group.js.map +1 -1
- package/es/header-helper/header-helper.js +1 -3
- package/es/header-helper/header-helper.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/chart-helper/get-axis-config.js +2 -2
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/pivot-header-layout.js +11 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js +25 -25
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +5 -6
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +2 -15
- package/es/scenegraph/graphic/text.js +1 -143
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.d.ts +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +10 -8
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/column-helper.js +3 -8
- package/es/scenegraph/group-creater/column-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.js +7 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +3 -1
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/state/spark-line/index.js +1 -1
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.d.ts +2 -2
- package/es/state/state.js +3 -4
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +4 -3
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.d.ts +1 -1
- package/es/ts-types/common.js.map +1 -1
- package/es/ts-types/events.d.ts +1 -1
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -2
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +1 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/package.json +9 -9
- package/cjs/scenegraph/component/menu.d.ts +0 -41
- package/es/scenegraph/component/menu.d.ts +0 -41
package/cjs/core/BaseTable.js
CHANGED
|
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
33
33
|
value: !0
|
|
34
34
|
}), exports.BaseTable = void 0;
|
|
35
35
|
|
|
36
|
-
const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"),
|
|
36
|
+
const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), vutils_1 = require("@visactor/vutils"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_2 = require("@visactor/vutils"), measure_text_1 = require("../scenegraph/utils/measure-text"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), legend_1 = require("../components/legend/legend"), vdataset_1 = require("@visactor/vdataset"), title_1 = require("../components/title/title"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
|
|
37
37
|
|
|
38
38
|
(0, style_1.importStyle)();
|
|
39
39
|
|
|
@@ -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;
|
|
48
|
-
if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.10.1-alpha.
|
|
48
|
+
if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.10.1-alpha.3",
|
|
49
49
|
this.id = `VTable${Date.now()}`, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
50
50
|
!container) 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, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, 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} = options;
|
|
@@ -88,7 +88,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
88
88
|
internalProps.bodyHelper = new body_helper_1.BodyHelper(this), internalProps.headerHelper = new header_helper_1.HeaderHelper(this),
|
|
89
89
|
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : internalProps.colCount,
|
|
90
90
|
internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
|
|
91
|
-
this.
|
|
91
|
+
this._vDataSet = new vdataset_1.DataSet, this.scenegraph = new scenegraph_1.Scenegraph(this),
|
|
92
92
|
this.stateManeger = new state_1.StateManeger(this), this.eventManeger = new event_1.EventManeger(this),
|
|
93
93
|
options.legends && (internalProps.legends = new legend_1.TableLegend(options.legends, this),
|
|
94
94
|
this.scenegraph.tableGroup.setAttributes({
|
|
@@ -248,13 +248,13 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
248
248
|
return this._widthMode;
|
|
249
249
|
}
|
|
250
250
|
set widthMode(widthMode) {
|
|
251
|
-
widthMode !== this._widthMode && (this._widthMode = widthMode);
|
|
251
|
+
widthMode !== this._widthMode && (this._widthMode = widthMode, this.options.widthMode = widthMode);
|
|
252
252
|
}
|
|
253
253
|
get heightMode() {
|
|
254
254
|
return this._heightMode;
|
|
255
255
|
}
|
|
256
256
|
set heightMode(heightMode) {
|
|
257
|
-
heightMode !== this._heightMode && (this._heightMode = heightMode);
|
|
257
|
+
heightMode !== this._heightMode && (this._heightMode = heightMode, this.options.heightMode = heightMode);
|
|
258
258
|
}
|
|
259
259
|
get autoFillWidth() {
|
|
260
260
|
return this._autoFillWidth;
|
|
@@ -663,7 +663,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
663
663
|
internalProps.theme = themes_1.default.of(null !== (_a = options.theme) && void 0 !== _a ? _a : themes_1.default.DEFAULT),
|
|
664
664
|
internalProps.autoWrapText = options.autoWrapText, internalProps.allowFrozenColCount = null !== (_b = options.allowFrozenColCount) && void 0 !== _b ? _b : internalProps.colCount,
|
|
665
665
|
internalProps.limitMaxAutoWidth = null !== (_c = options.limitMaxAutoWidth) && void 0 !== _c ? _c : 450,
|
|
666
|
-
this.
|
|
666
|
+
this._vDataSet = new vdataset_1.DataSet, null === (_d = internalProps.legends) || void 0 === _d || _d.release(),
|
|
667
667
|
null === (_e = internalProps.title) || void 0 === _e || _e.release(), internalProps.layoutMap.release(),
|
|
668
668
|
this.scenegraph.clearCells(), this.stateManeger.initState(), this._updateSize(),
|
|
669
669
|
options.legends && (internalProps.legends = new legend_1.TableLegend(options.legends, this),
|
|
@@ -685,6 +685,10 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
685
685
|
this.headerStyleCache = new Map, this.bodyStyleCache = new Map, this.clearColWidthCache(),
|
|
686
686
|
this.clearRowHeightCache();
|
|
687
687
|
}
|
|
688
|
+
renderWithRecreateCells() {
|
|
689
|
+
this.refreshHeader(), this.scenegraph.clearCells(), this.headerStyleCache = new Map,
|
|
690
|
+
this.bodyStyleCache = new Map, this.scenegraph.createSceneGraph(), this.render();
|
|
691
|
+
}
|
|
688
692
|
getFrozenRowsHeight() {
|
|
689
693
|
return this.getRowsHeight(0, this.frozenRowCount - 1);
|
|
690
694
|
}
|
|
@@ -865,13 +869,20 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
865
869
|
return this.internalProps.autoWrapText;
|
|
866
870
|
}
|
|
867
871
|
set autoWrapText(autoWrapText) {
|
|
872
|
+
this.internalProps.autoWrapText = autoWrapText, this.options.autoWrapText = autoWrapText;
|
|
873
|
+
}
|
|
874
|
+
updateAutoWrapText(autoWrapText) {
|
|
868
875
|
this.internalProps.autoWrapText !== autoWrapText && (this.internalProps.autoWrapText = autoWrapText,
|
|
869
|
-
this.options.autoWrapText = autoWrapText, this.
|
|
870
|
-
this.render())
|
|
876
|
+
this.options.autoWrapText = autoWrapText, this.scenegraph.clearCells(), this.headerStyleCache = new Map,
|
|
877
|
+
this.bodyStyleCache = new Map, this.scenegraph.createSceneGraph(), this.render());
|
|
871
878
|
}
|
|
872
879
|
get theme() {
|
|
873
880
|
return this.internalProps.theme;
|
|
874
881
|
}
|
|
882
|
+
set theme(theme) {
|
|
883
|
+
this.internalProps.theme = themes_1.default.of(null != theme ? theme : themes_1.default.DEFAULT),
|
|
884
|
+
this.options.theme = theme;
|
|
885
|
+
}
|
|
875
886
|
updateTheme(theme) {
|
|
876
887
|
this.internalProps.theme = themes_1.default.of(null != theme ? theme : themes_1.default.DEFAULT),
|
|
877
888
|
this.options.theme = theme, this.scenegraph.clearCells(), this.headerStyleCache = new Map,
|
|
@@ -1017,7 +1028,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1017
1028
|
row: row,
|
|
1018
1029
|
field: this.getHeaderField(col, row),
|
|
1019
1030
|
cellHeaderPaths: this.internalProps.layoutMap.getCellHeaderPaths(col, row),
|
|
1020
|
-
|
|
1031
|
+
title: colDef.title,
|
|
1021
1032
|
columnType: colDef.columnType ? "string" == typeof colDef.columnType ? colDef.columnType : "progressbar" : "text",
|
|
1022
1033
|
originData: this.getCellOriginRecord(col, row),
|
|
1023
1034
|
cellRange: this.getCellRangeRelativeRect({
|
|
@@ -1083,7 +1094,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1083
1094
|
value: this.getCellValue(col, row),
|
|
1084
1095
|
dataValue: this.getCellOriginValue(col, row),
|
|
1085
1096
|
cellHeaderPaths: this.getCellHeaderPaths(col, row)
|
|
1086
|
-
}, styleClass, this.options.autoWrapText), (0,
|
|
1097
|
+
}, styleClass, this.options.autoWrapText), (0, vutils_2.isFunction)(style) || this.bodyStyleCache.set(cacheKey, cacheStyle),
|
|
1087
1098
|
cacheStyle;
|
|
1088
1099
|
}
|
|
1089
1100
|
clearCellStyleCache() {
|
|
@@ -1148,8 +1159,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1148
1159
|
return {
|
|
1149
1160
|
textAlign: theme.text.textAlign,
|
|
1150
1161
|
textBaseline: theme.text.textBaseline,
|
|
1151
|
-
bgColor: (0,
|
|
1152
|
-
color: (0,
|
|
1162
|
+
bgColor: (0, vutils_2.isBoolean)(theme.group.fill) ? (0, get_prop_1.getProp)("bgColor", actStyle, col, row, this) : theme.group.fill,
|
|
1163
|
+
color: (0, vutils_2.isBoolean)(theme.text.fill) ? (0, get_prop_1.getProp)("color", actStyle, col, row, this) : theme.text.fill,
|
|
1153
1164
|
fontFamily: theme.text.fontFamily,
|
|
1154
1165
|
fontSize: theme.text.fontSize,
|
|
1155
1166
|
fontWeight: theme.text.fontWeight,
|
|
@@ -1159,7 +1170,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1159
1170
|
autoWrapText: null != autoWrapText && autoWrapText,
|
|
1160
1171
|
lineClamp: null != lineClamp ? lineClamp : "auto",
|
|
1161
1172
|
textOverflow: textOverflow,
|
|
1162
|
-
borderColor: (0,
|
|
1173
|
+
borderColor: (0, vutils_2.isBoolean)(theme.group.stroke) ? (0, get_prop_1.getProp)("borderColor", actStyle, col, row, this) : theme.group.stroke,
|
|
1163
1174
|
borderLineWidth: theme.group.lineWidth,
|
|
1164
1175
|
borderLineDash: theme.group.lineDash,
|
|
1165
1176
|
underline: !!theme.text.underline,
|
|
@@ -1298,13 +1309,6 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1298
1309
|
measureText(text, font) {
|
|
1299
1310
|
return measure_text_1.textMeasure.measureText(text, font);
|
|
1300
1311
|
}
|
|
1301
|
-
measureTextBounds(attributes) {
|
|
1302
|
-
const text = new text_1.WrapText(attributes);
|
|
1303
|
-
return {
|
|
1304
|
-
width: text.AABBBounds.width(),
|
|
1305
|
-
height: text.AABBBounds.height()
|
|
1306
|
-
};
|
|
1307
|
-
}
|
|
1308
1312
|
getCustomRender(col, row) {
|
|
1309
1313
|
let customRender;
|
|
1310
1314
|
if ("body" !== this.getCellType(col, row)) {
|
|
@@ -1335,6 +1339,21 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
1335
1339
|
const cellGroup = this.scenegraph.getCell(null === (_b = null === (_a = this.stateManeger.hover) || void 0 === _a ? void 0 : _a.cellPos) || void 0 === _b ? void 0 : _b.col, null === (_d = null === (_c = this.stateManeger.hover) || void 0 === _c ? void 0 : _c.cellPos) || void 0 === _d ? void 0 : _d.row);
|
|
1336
1340
|
return "chart" === (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _e ? void 0 : _e[0]) || void 0 === _f ? void 0 : _f.type) ? cellGroup.getChildren()[0].activeChartInstance : null;
|
|
1337
1341
|
}
|
|
1342
|
+
cellIsInVisualView(col, row) {
|
|
1343
|
+
const drawRange = this.getDrawRange(), rect = this.getCellRelativeRect(col, row);
|
|
1344
|
+
return col < this.frozenColCount && row < this.frozenRowCount || rect.top >= drawRange.top && rect.bottom <= drawRange.bottom && rect.left >= drawRange.left && rect.right <= drawRange.right;
|
|
1345
|
+
}
|
|
1346
|
+
exportImg() {
|
|
1347
|
+
return this.scenegraph.stage.toCanvas().toDataURL();
|
|
1348
|
+
}
|
|
1349
|
+
exportCellImg(col, row) {
|
|
1350
|
+
this.cellIsInVisualView(col, row) || this.scrollToCell({
|
|
1351
|
+
col: col,
|
|
1352
|
+
row: row
|
|
1353
|
+
});
|
|
1354
|
+
const cellRect = this.getCellRelativeRect(col, row);
|
|
1355
|
+
return this.scenegraph.stage.toCanvas(!1, (new vutils_1.AABBBounds).set(cellRect.left + this.tableX + 1, cellRect.top + this.tableY + 1, cellRect.right + this.tableX, cellRect.bottom + this.tableY)).toDataURL();
|
|
1356
|
+
}
|
|
1338
1357
|
}
|
|
1339
1358
|
|
|
1340
1359
|
exports.BaseTable = BaseTable;
|