@visactor/vtable 1.26.2-alpha.1 → 1.27.0-alpha.0
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/body-helper/style.js +2 -1
- package/cjs/core/BaseTable.js +3 -4
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/data/CachedDataSource.js +0 -1
- package/cjs/dataset/DataStatistics.js +2 -1
- package/cjs/event/sparkline-event.js +1 -2
- package/cjs/header-helper/style.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -1
- package/cjs/scenegraph/animation/appear.js +5 -3
- package/cjs/scenegraph/animation/appear.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +3 -1
- package/cjs/scenegraph/scenegraph.js +19 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/vrender-app.d.ts +14 -0
- package/cjs/vrender-app.js +65 -0
- package/cjs/vrender-app.js.map +1 -0
- package/cjs/vrender.d.ts +18 -1
- package/cjs/vrender.js +51 -14
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +21124 -14426
- package/dist/vtable.min.js +1 -1
- package/es/body-helper/style.js +2 -1
- package/es/core/BaseTable.js +3 -4
- package/es/core/BaseTable.js.map +1 -1
- package/es/data/CachedDataSource.js +1 -2
- package/es/dataset/DataStatistics.js +2 -1
- package/es/event/sparkline-event.js +1 -2
- package/es/header-helper/style.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/plugins/custom-cell-style.js +1 -1
- package/es/scenegraph/animation/appear.js +5 -3
- package/es/scenegraph/animation/appear.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +3 -1
- package/es/scenegraph/scenegraph.js +18 -5
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/vrender-app.d.ts +14 -0
- package/es/vrender-app.js +63 -0
- package/es/vrender-app.js.map +1 -0
- package/es/vrender.d.ts +18 -1
- package/es/vrender.js +31 -8
- package/es/vrender.js.map +1 -1
- package/package.json +8 -7
|
@@ -245,5 +245,4 @@ function syncGroupCollapseState(oldSource, newSource, oldGroupMap, newGroupMap)
|
|
|
245
245
|
isValid(newRecord) && (newRecord.hierarchyState = oldSource[i].hierarchyState),
|
|
246
246
|
isArray(null == oldRecord ? void 0 : oldRecord.children) && isArray(null == newRecord ? void 0 : newRecord.children) && 0 !== oldRecord.map.size && 0 !== newRecord.map.size && syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
|
|
247
247
|
}
|
|
248
|
-
}
|
|
249
|
-
//# sourceMappingURL=CachedDataSource.js.map
|
|
248
|
+
}
|
|
@@ -13,4 +13,5 @@ export function of(headerStyle, defaultHeaderStyle, styleArg, StyleClass, global
|
|
|
13
13
|
return headerStyle || defaultHeaderStyle ? headerStyle instanceof Style ? headerStyle : "function" == typeof headerStyle ? of(headerStyle(styleArg), defaultHeaderStyle, styleArg, StyleClass, globalAutoWrapText, theme) : (headerStyle || (headerStyle = {}),
|
|
14
14
|
globalAutoWrapText && !isValid(headerStyle.autoWrapText) && (headerStyle.autoWrapText = !0),
|
|
15
15
|
StyleClass === CheckboxStyle ? new CheckboxStyle(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : new StyleClass(null != headerStyle ? headerStyle : {}, null != defaultHeaderStyle ? defaultHeaderStyle : {})) : StyleClass.DEFAULT;
|
|
16
|
-
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=style.js.map
|
package/es/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { toBoxArray } from './tools/helper';
|
|
|
24
24
|
export { Icon } from './scenegraph/graphic/icon';
|
|
25
25
|
export { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from './scenegraph/component/custom';
|
|
26
26
|
export { matrixAllocate, transformPointForCanvas, mapToCanvasPointForCanvas, registerGlobalEventTransformer, registerWindowEventTransformer, vglobal, Group, graphicUtil } from './vrender';
|
|
27
|
-
export declare const version = "1.26.
|
|
27
|
+
export declare const version = "1.26.1";
|
|
28
28
|
export { TYPES, core, ListTable, ListTableSimple, BaseTableAPI, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, textMeasure, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, setCustomAlphabetCharSet, restoreMeasureText, pluginsDefinition };
|
|
29
29
|
declare function getIcons(): {
|
|
30
30
|
[key: string]: TYPES.ColumnIconOption;
|
package/es/index.js
CHANGED
|
@@ -50,7 +50,7 @@ export { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from "./scenegraph/compo
|
|
|
50
50
|
|
|
51
51
|
export { matrixAllocate, transformPointForCanvas, mapToCanvasPointForCanvas, registerGlobalEventTransformer, registerWindowEventTransformer, vglobal, Group, graphicUtil } from "./vrender";
|
|
52
52
|
|
|
53
|
-
export const version = "1.26.
|
|
53
|
+
export const version = "1.26.1";
|
|
54
54
|
|
|
55
55
|
export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, textMeasure, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, setCustomAlphabetCharSet, restoreMeasureText, pluginsDefinition };
|
|
56
56
|
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EA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Aa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE7F,OAAO,EACL,cAAc,EACd,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,OAAO,EACP,KAAK,EACL,WAAW,EACZ,MAAM,WAAW,CAAC;AAKnB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAIhC,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAGf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAiBV,WAAW,EACX,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EAClB,CAAC;AAGF,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAED,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AACD,KAAK,CAAC,eAAe,CAAC;AAEtB,cAAc,cAAc,CAAC;AAC7B,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AAE/G,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { registerForVrender } from './vrender';\nregisterForVrender();\n\nimport * as TYPES from './ts-types';\nimport * as core from './core';\nimport * as data from './data';\nimport * as icons from './icons';\nimport * as register from './register';\nimport * as themes from './themes';\nimport * as DataStatistics from './dataset/DataStatistics';\nimport * as pluginsDefinition from './plugins';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n ListTableConstructorOptions,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTableAll as ListTable } from './ListTable-all';\nimport { ListTableSimple } from './ListTable-simple';\n// import { PivotTable } from './PivotTable';\nimport { PivotTableAll as PivotTable } from './PivotTable-all';\nimport { PivotTableSimple } from './PivotTable-simple';\nimport { PivotChart } from './PivotChart';\nimport type { MousePointerCellEvent } from './ts-types/events';\nimport * as CustomLayout from './render/layout';\n\nimport { updateCell } from './scenegraph/group-creater/cell-helper';\nimport { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';\nimport { restoreMeasureText, setCustomAlphabetCharSet, textMeasure } from './scenegraph/utils/text-measure';\nimport type { BaseTableAPI } from './ts-types/base-table';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\nexport { getTargetCell } from './event/util';\nexport { toBoxArray } from './tools/helper';\nexport { Icon } from './scenegraph/graphic/icon';\nexport { CUSTOM_MERGE_PRE_NAME, CUSTOM_CONTAINER_NAME } from './scenegraph/component/custom';\n// 为插件等场景提供必要的 vrender 能力:只导出用到的符号,避免与 render/jsx 的导出成员发生命名冲突。\nexport {\n matrixAllocate,\n transformPointForCanvas,\n mapToCanvasPointForCanvas,\n registerGlobalEventTransformer,\n registerWindowEventTransformer,\n vglobal,\n Group,\n graphicUtil\n} from './vrender';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.26.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n BaseTableAPI,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n textMeasure,\n themes,\n data,\n MousePointerCellEvent,\n getIcons,\n clearGlobal,\n //plugin registers\n register,\n /**\n * 暂不推荐使用\n */\n DataStatistics,\n CustomLayout,\n updateCell,\n renderChart,\n setCustomAlphabetCharSet,\n restoreMeasureText,\n pluginsDefinition\n};\n\n/** @private */\nfunction getIcons(): {\n [key: string]: TYPES.ColumnIconOption;\n} {\n return icons.get();\n}\n/** 清理内部的全局变量 如注册的icon theme等 以及共享的header column类实例 */\nfunction clearGlobal() {\n register.clearAll();\n // headers.type.clearGlobal();\n // columns.type.clearGlobal();\n}\nTYPES.AggregationType;\n\nexport * from './components';\nexport * from './scenegraph/group-creater/cell-type';\n\nexport { TABLE_EVENT_TYPE } from './core/TABLE_EVENT_TYPE';\nexport { PIVOT_CHART_EVENT_TYPE, PIVOT_TABLE_EVENT_TYPE } from './ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE';\n\nexport { EventTarget } from './event/EventTarget';\n"]}
|
|
@@ -159,4 +159,4 @@ export function mergeStyle(cacheStyle, customCellStyle) {
|
|
|
159
159
|
export const registerCustomCellStylePlugin = () => {
|
|
160
160
|
Factory.registerComponent("customCellStylePlugin", CustomCellStylePlugin);
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=custom-cell-style.js.map
|
|
162
|
+
//# sourceMappingURL=custom-cell-style.js.map
|
|
@@ -7,12 +7,14 @@ export function dealWithAnimationAppear(table) {
|
|
|
7
7
|
delay = null !== (_b = table.options.animationAppear.delay) && void 0 !== _b ? _b : 0,
|
|
8
8
|
type = null !== (_c = table.options.animationAppear.type) && void 0 !== _c ? _c : "one-by-one",
|
|
9
9
|
direction = null !== (_d = table.options.animationAppear.direction) && void 0 !== _d ? _d : "row");
|
|
10
|
-
const {scenegraph: scene
|
|
10
|
+
const {scenegraph: scene} = table, {colEnd: colEnd, rowEnd: rowEnd} = scene.proxy;
|
|
11
11
|
for (let col = 0; col <= colEnd; col++) for (let row = 0; row <= rowEnd; row++) {
|
|
12
12
|
const cellGroup = scene.highPerformanceGetCell(col, row);
|
|
13
13
|
cellGroup && "cell" === cellGroup.role && cellGroup.forEachChildren((child => {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
var _a;
|
|
15
|
+
const finalOpacity = null !== (_a = child.attribute.opacity) && void 0 !== _a ? _a : 1, animationDelay = "one-by-one" === type ? ("row" === direction ? row : col) * (duration - delay) : delay;
|
|
16
|
+
child.setAttribute("opacity", finalOpacity), child.animate().wait(animationDelay).from({
|
|
17
|
+
opacity: 0
|
|
16
18
|
}, duration, "linear");
|
|
17
19
|
}));
|
|
18
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/animation/appear.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,uBAAuB,CAAC,KAAmB;;IACzD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE;QAClC,OAAO;KACR;IAED,IAAI,QAAgB,CAAC;IACrB,IAAI,KAAa,CAAC;IAClB,IAAI,IAA0B,CAAC;IAC/B,IAAI,SAA2B,CAAC;IAEhC,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,KAAK,IAAI,EAAE;QAC1C,QAAQ,GAAG,GAAG,CAAC;QACf,KAAK,GAAG,CAAC,CAAC;QACV,IAAI,GAAG,YAAY,CAAC;QACpB,SAAS,GAAG,QAAQ,CAAC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AAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAGpC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;IAEvC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;QACtC,KAAK,IAAI,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,MAAM,EAAE,GAAG,EAAE,EAAE;YACtC,MAAM,SAAS,GAAG,KAAK,CAAC,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACzD,IAAI,SAAS,IAAI,SAAS,CAAC,IAAI,KAAK,MAAM,EAAE;gBAC1C,SAAS,CAAC,eAAe,CAAC,CAAC,KAAW,EAAE,EAAE;;oBACxC,MAAM,YAAY,GAAG,MAAA,KAAK,CAAC,SAAS,CAAC,OAAO,mCAAI,CAAC,CAAC;oBAClD,MAAM,cAAc,GAAG,IAAI,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;oBAE9G,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;oBAC5C,KAAK,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;gBAChF,CAAC,CAAC,CAAC;aACJ;SACF;KACF;AACH,CAAC","file":"appear.js","sourcesContent":["import type { Text } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\nexport function dealWithAnimationAppear(table: BaseTableAPI) {\n if (!table.options.animationAppear) {\n return;\n }\n\n let duration: number;\n let delay: number;\n let type: 'all' | 'one-by-one';\n let direction: 'row' | 'column';\n\n if (table.options.animationAppear === true) {\n duration = 500;\n delay = 0;\n type = 'one-by-one';\n direction = 'column';\n } else {\n duration = table.options.animationAppear.duration ?? 500;\n delay = table.options.animationAppear.delay ?? 0;\n type = table.options.animationAppear.type ?? 'one-by-one';\n direction = table.options.animationAppear.direction ?? 'row';\n }\n\n const { scenegraph: scene } = table;\n\n // header cell\n const { colEnd, rowEnd } = scene.proxy; // to do: right bottom frozen\n\n for (let col = 0; col <= colEnd; col++) {\n for (let row = 0; row <= rowEnd; row++) {\n const cellGroup = scene.highPerformanceGetCell(col, row);\n if (cellGroup && cellGroup.role === 'cell') {\n cellGroup.forEachChildren((child: Text) => {\n const finalOpacity = child.attribute.opacity ?? 1;\n const animationDelay = type === 'one-by-one' ? (direction === 'row' ? row : col) * (duration - delay) : delay;\n\n child.setAttribute('opacity', finalOpacity);\n child.animate().wait(animationDelay).from({ opacity: 0 }, duration, 'linear');\n });\n }\n }\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type IRect, type IRectGraphicAttribute, type IStage } from './../vrender';
|
|
2
2
|
import type { CellRange, CellSubLocation } from '../ts-types';
|
|
3
3
|
import { type CellAddress, type SortOrder } from '../ts-types';
|
|
4
4
|
import type { Group } from './graphic/group';
|
|
@@ -49,6 +49,7 @@ export declare class Scenegraph {
|
|
|
49
49
|
lastSelectId: string;
|
|
50
50
|
component: TableComponent;
|
|
51
51
|
stage: IStage;
|
|
52
|
+
releaseVRenderAppRef?: () => void;
|
|
52
53
|
table: BaseTableAPI;
|
|
53
54
|
isPivot: boolean;
|
|
54
55
|
hasFrozen: boolean;
|
|
@@ -81,6 +82,7 @@ export declare class Scenegraph {
|
|
|
81
82
|
initSceneGraph(): void;
|
|
82
83
|
canvasShowMenu(): void;
|
|
83
84
|
clearCells(): void;
|
|
85
|
+
releaseStage(): void;
|
|
84
86
|
updateStageBackground(): void;
|
|
85
87
|
createComponent(): void;
|
|
86
88
|
updateComponent(): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createStageFromVRenderApp, container, setPoptipTheme, vglobal, registerForVrender } from "./../vrender";
|
|
2
2
|
|
|
3
3
|
import { InternalIconName } from "../ts-types";
|
|
4
4
|
|
|
@@ -54,8 +54,6 @@ import { initSceneGraph } from "./group-creater/init-scenegraph";
|
|
|
54
54
|
|
|
55
55
|
import { updateContainerChildrenX, updateContainerChildrenY } from "./utils/update-container";
|
|
56
56
|
|
|
57
|
-
import { setPoptipTheme } from "./../vrender";
|
|
58
|
-
|
|
59
57
|
import textMeasureModule from "./utils/text-measure";
|
|
60
58
|
|
|
61
59
|
import { getIconByXY, hideClickIcon, hideHoverIcon, resetResidentHoverIcon, residentHoverIcon, setIconHoverStyle, setIconNormalStyle, showClickIcon, showHoverIcon, updateFrozenIcon, updateHierarchyIcon, updateSortIcon } from "./icon/icon-update";
|
|
@@ -97,7 +95,8 @@ export class Scenegraph {
|
|
|
97
95
|
setPoptipTheme(this.table.theme.textPopTipStyle), "node" === Env.mode ? (vglobal.setEnv("node", table.options.modeParams),
|
|
98
96
|
width = table.canvasWidth, height = table.canvasHeight) : table.options.canvas && table.options.viewBox ? (vglobal.setEnv("browser"),
|
|
99
97
|
width = table.options.viewBox.x2 - table.options.viewBox.x1, height = table.options.viewBox.y2 - table.options.viewBox.y1) : (vglobal.setEnv("browser"),
|
|
100
|
-
width = table.canvas.width, height = table.canvas.height)
|
|
98
|
+
width = table.canvas.width, height = table.canvas.height);
|
|
99
|
+
const {stage: stage, releaseAppRef: releaseAppRef} = createStageFromVRenderApp(Object.assign({
|
|
101
100
|
canvas: table.canvas,
|
|
102
101
|
width: width,
|
|
103
102
|
height: height,
|
|
@@ -113,7 +112,11 @@ export class Scenegraph {
|
|
|
113
112
|
},
|
|
114
113
|
canvasControled: !table.options.canvas,
|
|
115
114
|
viewBox: table.options.viewBox
|
|
116
|
-
}, table.options.renderOption)
|
|
115
|
+
}, table.options.renderOption), {
|
|
116
|
+
mode: "node" === Env.mode ? "node" : "browser",
|
|
117
|
+
scope: "vtable"
|
|
118
|
+
});
|
|
119
|
+
this.stage = stage, this.releaseVRenderAppRef = releaseAppRef, this.stage.defaultLayer.setTheme({
|
|
117
120
|
group: {
|
|
118
121
|
boundsPadding: 0,
|
|
119
122
|
strokeBoundsBuffer: 0,
|
|
@@ -296,6 +299,16 @@ export class Scenegraph {
|
|
|
296
299
|
delete this.tableGroup.border), null === (_u = this.proxy) || void 0 === _u || _u.release(),
|
|
297
300
|
null === (_v = this.table.reactCustomLayout) || void 0 === _v || _v.clearCache();
|
|
298
301
|
}
|
|
302
|
+
releaseStage() {
|
|
303
|
+
var _a;
|
|
304
|
+
const releaseAppRef = this.releaseVRenderAppRef;
|
|
305
|
+
this.releaseVRenderAppRef = void 0;
|
|
306
|
+
try {
|
|
307
|
+
null === (_a = this.stage) || void 0 === _a || _a.release();
|
|
308
|
+
} finally {
|
|
309
|
+
null == releaseAppRef || releaseAppRef();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
299
312
|
updateStageBackground() {
|
|
300
313
|
this.stage.background = this.table.theme.underlayBackgroundColor, this.stage.renderNextFrame();
|
|
301
314
|
}
|