@visactor/vtable 1.7.0 → 1.7.1
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 +1 -1
- 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/scenegraph/graphic/group.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +2 -2
- package/dist/vtable.min.js +1 -1
- package/es/core/BaseTable.js +1 -1
- 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/scenegraph/graphic/group.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/es/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { restoreMeasureText, setCustomAlphabetCharSet } from './scenegraph/utils
|
|
|
19
19
|
export { getDataCellPath } from './tools/get-data-path';
|
|
20
20
|
export * from './render/jsx';
|
|
21
21
|
export { getTargetCell } from './event/util';
|
|
22
|
-
export declare const version = "1.7.
|
|
22
|
+
export declare const version = "1.7.1";
|
|
23
23
|
export { TYPES, core, ListTable, ListTableSimple, ListTableConstructorOptions, PivotTable, PivotTableSimple, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, GanttConstructorOptions, IHeaderTreeDefine, IDimension, IIndicator, ITitleDefine, ICornerDefine, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, themes, data, MousePointerCellEvent, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
|
|
24
24
|
declare function getIcons(): {
|
|
25
25
|
[key: string]: TYPES.ColumnIconOption;
|
package/es/index.js
CHANGED
|
@@ -40,7 +40,7 @@ export * from "./render/jsx";
|
|
|
40
40
|
|
|
41
41
|
export { getTargetCell } from "./event/util";
|
|
42
42
|
|
|
43
|
-
export const version = "1.7.
|
|
43
|
+
export const version = "1.7.1";
|
|
44
44
|
|
|
45
45
|
export { TYPES, core, ListTable, ListTableSimple, PivotTable, PivotTableSimple, PivotChart, themes, data, getIcons, clearGlobal, register, DataStatistics, CustomLayout, updateCell, renderChart, graphicUtil, setCustomAlphabetCharSet, restoreMeasureText };
|
|
46
46
|
|
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAuB3D,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAI/B,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAEf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAkBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAEnB,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","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, 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 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 GanttConstructorOptions,\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 } from './scenegraph/utils/text-measure';\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';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.7.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC5D,kBAAkB,EAAE,CAAC;AAErB,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAC;AAuB3D,OAAO,EAAE,YAAY,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAK/F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAK7C,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAI/B,OAAO,EAKL,KAAK,EACL,IAAI,EACJ,SAAS,EACT,eAAe,EAEf,UAAU,EACV,gBAAgB,EAGhB,UAAU,EAkBV,MAAM,EACN,IAAI,EAEJ,QAAQ,EACR,WAAW,EAEX,QAAQ,EAIR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,kBAAkB,EAEnB,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","file":"index.js","sourcesContent":["/* eslint-disable sort-imports */\nimport { graphicUtil, 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 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 GanttConstructorOptions,\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 } from './scenegraph/utils/text-measure';\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';\n\n// export * as VRender from './vrender';\n// import * as VRender from './vrender';\n\nexport const version = \"1.7.1\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableSimple,\n ListTableConstructorOptions,\n PivotTable,\n PivotTableSimple,\n PivotTableConstructorOptions,\n PivotChartConstructorOptions,\n PivotChart,\n GanttConstructorOptions,\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 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 graphicUtil,\n setCustomAlphabetCharSet,\n restoreMeasureText\n // VRender // should use import {xxx} from '@visactor/vtable/es/vrender'\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/graphic/group.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKxD,MAAM,OAAO,KAAM,SAAQ,YAAY;IA+CrC,KAAK;QACH,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,cAAc,CAAC,IAAY,EAAE,IAAc;QAMzC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;YACvC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;gBACvB,MAAM,GAAG,KAAK,CAAC;gBACf,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,IAAI,I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AAC5C,CAAC","file":"group.js","sourcesContent":["import type { IGraphic, IColor, IRect, INode, IGroupGraphicAttribute, ISetAttributeContext } from './../../vrender';\nimport { Group as VRenderGroup } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { InteractionState } from '../../ts-types';\nimport { isNumber, type AABBBounds } from '@visactor/vutils';\n\nexport class Group extends VRenderGroup {\n role?: string;\n col?: number;\n row?: number;\n mergeStartCol?: number;\n mergeStartRow?: number;\n mergeEndCol?: number;\n mergeEndRow?: number;\n contentWidth?: number;\n contentHeight?: number;\n rowNumber?: number; // row number of the column group\n colHeight?: number; // current height of the column group\n border?: IRect; // table/header/body的border mark,挂载在这里方便更新\n needUpdate?: boolean;\n\n needUpdateWidth?: boolean;\n needUpdateHeight?: boolean;\n\n // changes for size align for fs\n // constructor(attribute?: IGroupGraphicAttribute) {\n // dealWidthSize(attribute, attribute);\n // super(attribute);\n // }\n\n // setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n // if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {\n // this.attribute[`old${key}`];\n // }\n // const values = {\n // [key]: value\n // };\n // this.setAttributes(values, forceUpdateTag, context);\n // }\n\n // setAttributes(\n // params: Partial<IGroupGraphicAttribute>,\n // forceUpdateTag?: boolean,\n // context?: ISetAttributeContext\n // ): void {\n // dealWidthSize(params, this.attribute);\n // super.setAttributes(params, forceUpdateTag, context);\n // }\n\n /**\n * @description: 清空Group下全部子元素\n * @return {*}\n */\n clear() {\n this.removeAllChild();\n }\n\n getChildByName(name: string, deep?: boolean): any {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // if (this.children[i].name === name) {\n // return this.children[i] as unknown as T;\n // }\n // }\n let result = null;\n this.forEachChildren((child: IGraphic) => {\n if (child.name === name) {\n result = child;\n return true; // 提前退出循环\n }\n return false;\n });\n\n if (deep) {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // const child = this.children[i] as Group;\n\n // if (!child.getChildByName) {\n // continue;\n // }\n\n // const target = child.getChildByName(name, true);\n\n // if (target) {\n // return target;\n // }\n // }\n this.forEachChildren((child: IGraphic) => {\n if ((child as Group).getChildByName) {\n const target = (child as Group).getChildByName(name, true);\n if (target) {\n result = target;\n return true;\n }\n }\n return false;\n });\n }\n\n return result;\n }\n\n get width() {\n let width = this.AABBBounds.width();\n if (width === Infinity || width === -Infinity) {\n width = 0;\n }\n return Math.max(width, this.attribute.width ?? 0);\n }\n\n get height() {\n let height = this.AABBBounds.height();\n if (height === Infinity || height === -Infinity) {\n height = 0;\n }\n return Math.max(height, this.attribute.height ?? 0);\n }\n\n setDeltaWidth(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('width', (this.attribute.width ?? 0) + deltaX);\n if (this.border) {\n this.border.setAttribute('width', this.border.attribute.width + deltaX);\n\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.width + deltaX\n );\n }\n }\n }\n\n setDeltaHeight(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('height', (this.attribute.height ?? 0) + deltaY);\n if (this.border) {\n this.border.setAttribute('height', this.border.attribute.height + deltaY);\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.height + deltaY\n );\n }\n }\n }\n\n setDeltaX(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('x', this.attribute.x + deltaX);\n }\n\n setDeltaY(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('y', this.attribute.y + deltaY);\n }\n\n /**\n * @description: 遍历所有子节点,跳过部分节点,默认跳过group的border\n * @return {*}\n */\n forEachChildrenSkipChild<T extends INode = INode>(\n cb: (item: T, index: number) => void | boolean,\n skipChildName = 'border-rect',\n reverse = false\n ) {\n if (reverse) {\n let child = this._lastChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._prev;\n }\n } else {\n let child = this._firstChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._next;\n }\n }\n }\n\n getColGroup(col: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.col === col) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n getRowGroup(row: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === row) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n addCellGroup(cellGroup: Group) {\n if (this.childrenCount === 0 || (this.lastChild as Group).row === cellGroup.row - 1) {\n this.addChild(cellGroup);\n } else {\n // for promise cell row order in column\n let c = this._firstChild as Group;\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === cellGroup.row - 1) {\n this.insertAfter(cellGroup, c);\n return;\n }\n c = c._next as Group;\n }\n this.addChild(cellGroup);\n }\n }\n\n getChildAt(index: number) {\n const child = super.getChildAt(index);\n if (child && child.name === 'border-rect') {\n return child._next;\n }\n return child;\n }\n\n protected tryUpdateAABBBounds(): AABBBounds {\n if (this.role === 'cell') {\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds;\n }\n // application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const selfChange = this.shouldSelfChangeUpdateAABBBounds();\n // const selfChange = true;\n const bounds = this.doUpdateAABBBounds();\n this.addUpdateLayoutTag();\n // application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange);\n after(this, selfChange);\n\n return bounds;\n }\n return super.tryUpdateAABBBounds();\n }\n\n // 目前优化方案会导致合并单元格无法正常更新列宽(因为合并单元格更新bounds不会触发父节点bounds更新),暂时关闭优化方案\n // shouldUpdateAABBBoundsForRowMerge(): boolean {\n\n // }\n\n // shouldUpdateAABBBounds(): boolean {\n // return this.shouldSelfChangeUpdateAABBBounds();\n // // // 检索自己是否需要更新\n // // if (super.shouldUpdateAABBBounds()) {\n // // return true;\n // // }\n // // // 检索叶子节点是否有更新(如果children是叶子节点的话)\n // // if (this._childUpdateTag & UpdateTag.UPDATE_BOUNDS) {\n // // return true;\n // // }\n // // // 检索是否子group需要更新\n // // let needUpdate = false;\n // // this.forEachChildren((node: IGraphic) => {\n // // // 只查找group层级\n // // if (node.isContainer && (node as Group).shouldUpdateAABBBounds()) {\n // // needUpdate = true;\n // // return true;\n // // }\n // // return false;\n // // });\n // // return needUpdate;\n // }\n\n protected doUpdateAABBBounds(): any {\n // const groupTheme = getTheme(this).group;\n // debugger;\n if (this.role === 'cell') {\n const attribute = this.attribute;\n const { x, y, width, height } = attribute;\n this._AABBBounds.setValue(x, y, x + width, y + height);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n return this._AABBBounds;\n } else if (\n this.role === 'body' ||\n this.role === 'row-header' ||\n this.role === 'col-header' ||\n this.role === 'right-frozen' ||\n this.role === 'bottom-frozen' ||\n this.role === 'corner-header' ||\n this.role === 'corner-right-top-header' ||\n this.role === 'corner-right-bottom-header' ||\n this.role === 'corner-left-bottom-header'\n ) {\n // Infinity bounds for manual clip group\n this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n\n if (this.shadowRoot) {\n // this.shadowRoot.clearUpdateBoundTag();\n this.shadowRoot.tryUpdateAABBBounds();\n }\n return this._AABBBounds;\n }\n return super.doUpdateAABBBounds();\n // _AABBBounds\n // const bounds = graphicService.updateGroupAABBBounds(\n // attribute,\n // getTheme(this).group,\n // this._AABBBounds,\n // this\n // ) as AABBBounds;\n\n // const { boundsPadding = groupTheme.boundsPadding } = attribute;\n // const paddingArray = parsePadding(boundsPadding);\n // if (paddingArray) {\n // bounds.expand(paddingArray);\n // }\n // // 更新bounds之后需要设置父节点,否则tag丢失\n // this.parent && this.parent.addChildUpdateBoundTag();\n // this.clearUpdateBoundTag();\n\n // this.emit('AAABBBoundsChange');\n }\n\n // update column group row number\n updateColumnRowNumber(row: number) {\n if (!this.rowNumber) {\n this.rowNumber = row;\n } else {\n this.rowNumber = Math.max(this.rowNumber, row);\n }\n }\n\n // update column height\n updateColumnHeight(cellHeight: number) {\n if (!this.colHeight) {\n this.colHeight = cellHeight;\n } else {\n this.colHeight += cellHeight;\n }\n }\n\n // doUpdateLocalMatrix() {\n // const oldX = this.attribute.x;\n // const oldY = this.attribute.y;\n // this.attribute.x = Math.floor(this.attribute.x);\n // this.attribute.y = Math.floor(this.attribute.y);\n // super.doUpdateLocalMatrix();\n // this.attribute.x = oldX;\n // this.attribute.y = oldY;\n // }\n}\n\nfunction after(group: Group, selfChange: boolean) {\n if (!group.stage || !group.stage.dirtyBounds || !group.stage.renderCount) {\n return;\n }\n // group的子元素导致的bounds更新不用做dirtyBounds\n if (group.isContainer && !selfChange) {\n return;\n }\n group.stage.dirty(group.globalAABBBounds);\n}\n\n// function dealWidthSize(values: any, attributes: any) {\n// const x = values.x ?? attributes.oldx ?? attributes.x ?? 0 + values.dx ?? attributes.dx ?? 0;\n// const y = values.y ?? attributes.oldy ?? attributes.y ?? 0 + values.dy ?? attributes.dy ?? 0;\n// const width = values.width ?? attributes.oldwidth ?? attributes.width ?? 0;\n// const height = values.height ?? attributes.oldheight ?? attributes.height ?? 0;\n// isNumber(values.width) && (values.oldwidth = values.width);\n// isNumber(values.height) && (values.oldheight = values.height);\n// isNumber(values.x) && (values.oldx = values.x);\n// isNumber(values.y) && (values.oldy = values.y);\n\n// if (Math.floor(x + width) > Math.floor(width) + Math.floor(x)) {\n// values.width = Math.ceil(width);\n// } else {\n// values.width = Math.floor(width);\n// }\n\n// if (Math.floor(y + height) > Math.floor(height) + Math.floor(y)) {\n// values.height = Math.ceil(height);\n// } else {\n// values.height = Math.floor(height);\n// }\n// isNumber(values.x) && (values.x = Math.floor(values.x));\n// isNumber(values.y) && (values.y = Math.floor(values.y));\n// }\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/graphic/group.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAKxD,MAAM,OAAO,KAAM,SAAQ,YAAY;IA+CrC,KAAK;QACH,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAED,cAAc,CAAC,IAAY,EAAE,IAAc;QAMzC,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;YACvC,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE;gBACvB,MAAM,GAAG,KAAK,CAAC;gBACf,OAAO,IAAI,CAAC;aACb;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,EAAE;YAcR,IAAI,CAAC,eAAe,CAAC,CAAC,KAAe,EAAE,EAAE;gBACvC,IAAK,KAAe,CAAC,cAAc,EAAE;oBACnC,MAAM,MAAM,GAAI,KAAe,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;oBAC3D,IAAI,MAAM,EAAE;wBACV,MAAM,GAAG,MAAM,CAAC;wBAChB,OAAO,IAAI,CAAC;qBACb;iBACF;gBACD,OAAO,KAAK,CAAC;YACf,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,KAAK;;QACP,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,CAAC,QAAQ,EAAE;YAC7C,KAAK,GAAG,CAAC,CAAC;SACX;QACD,OAAO,IAA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,SAAS,GAAG,GAAG,CAAC;SACtB;aAAM;YACL,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;SAChD;IACH,CAAC;IAGD,kBAAkB,CAAC,UAAkB;QACnC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;SAC7B;aAAM;YACL,IAAI,CAAC,SAAS,IAAI,UAAU,CAAC;SAC9B;IACH,CAAC;CAWF;AAED,SAAS,KAAK,CAAC,KAAY,EAAE,UAAmB;IAC9C,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE;QACxE,OAAO;KACR;IAED,IAAI,KAAK,CAAC,WAAW,IAAI,CAAC,UAAU,EAAE;QACpC,OAAO;KACR;IACD,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAC5C,CAAC","file":"group.js","sourcesContent":["import type { IGraphic, IColor, IRect, INode, IGroupGraphicAttribute, ISetAttributeContext } from './../../vrender';\nimport { Group as VRenderGroup } from './../../vrender';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { InteractionState } from '../../ts-types';\nimport { isNumber, type AABBBounds } from '@visactor/vutils';\n\nexport class Group extends VRenderGroup {\n role?: string;\n col?: number;\n row?: number;\n mergeStartCol?: number;\n mergeStartRow?: number;\n mergeEndCol?: number;\n mergeEndRow?: number;\n contentWidth?: number;\n contentHeight?: number;\n rowNumber?: number; // row number of the column group\n colHeight?: number; // current height of the column group\n border?: IRect; // table/header/body的border mark,挂载在这里方便更新\n needUpdate?: boolean;\n\n needUpdateWidth?: boolean;\n needUpdateHeight?: boolean;\n\n // changes for size align for fs\n // constructor(attribute?: IGroupGraphicAttribute) {\n // dealWidthSize(attribute, attribute);\n // super(attribute);\n // }\n\n // setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n // if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {\n // this.attribute[`old${key}`];\n // }\n // const values = {\n // [key]: value\n // };\n // this.setAttributes(values, forceUpdateTag, context);\n // }\n\n // setAttributes(\n // params: Partial<IGroupGraphicAttribute>,\n // forceUpdateTag?: boolean,\n // context?: ISetAttributeContext\n // ): void {\n // dealWidthSize(params, this.attribute);\n // super.setAttributes(params, forceUpdateTag, context);\n // }\n\n /**\n * @description: 清空Group下全部子元素\n * @return {*}\n */\n clear() {\n this.removeAllChild();\n }\n\n getChildByName(name: string, deep?: boolean): any {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // if (this.children[i].name === name) {\n // return this.children[i] as unknown as T;\n // }\n // }\n let result = null;\n this.forEachChildren((child: IGraphic) => {\n if (child.name === name) {\n result = child;\n return true; // 提前退出循环\n }\n return false;\n });\n\n if (deep) {\n // for (let i = 0, j = this.children.length; i < j; i++) {\n // const child = this.children[i] as Group;\n\n // if (!child.getChildByName) {\n // continue;\n // }\n\n // const target = child.getChildByName(name, true);\n\n // if (target) {\n // return target;\n // }\n // }\n this.forEachChildren((child: IGraphic) => {\n if ((child as Group).getChildByName) {\n const target = (child as Group).getChildByName(name, true);\n if (target) {\n result = target;\n return true;\n }\n }\n return false;\n });\n }\n\n return result;\n }\n\n get width() {\n let width = this.AABBBounds.width();\n if (width === Infinity || width === -Infinity) {\n width = 0;\n }\n return Math.max(width, this.attribute.width ?? 0);\n }\n\n get height() {\n let height = this.AABBBounds.height();\n if (height === Infinity || height === -Infinity) {\n height = 0;\n }\n return Math.max(height, this.attribute.height ?? 0);\n }\n\n setDeltaWidth(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('width', (this.attribute.width ?? 0) + deltaX);\n if (this.border) {\n this.border.setAttribute('width', this.border.attribute.width + deltaX);\n\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.width + deltaX\n );\n }\n }\n }\n\n setDeltaHeight(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('height', (this.attribute.height ?? 0) + deltaY);\n if (this.border) {\n this.border.setAttribute('height', this.border.attribute.height + deltaY);\n if (this.border.type === 'group') {\n (this.border.firstChild as IRect).setAttribute(\n 'width',\n (this.border.firstChild as IRect).attribute.height + deltaY\n );\n }\n }\n }\n\n setDeltaX(deltaX: number) {\n if (deltaX === 0) {\n return;\n }\n this.setAttribute('x', this.attribute.x + deltaX);\n }\n\n setDeltaY(deltaY: number) {\n if (deltaY === 0) {\n return;\n }\n this.setAttribute('y', this.attribute.y + deltaY);\n }\n\n /**\n * @description: 遍历所有子节点,跳过部分节点,默认跳过group的border\n * @return {*}\n */\n forEachChildrenSkipChild<T extends INode = INode>(\n cb: (item: T, index: number) => void | boolean,\n skipChildName = 'border-rect',\n reverse = false\n ) {\n if (reverse) {\n let child = this._lastChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._prev;\n }\n } else {\n let child = this._firstChild;\n let i = 0;\n while (child) {\n if (child.name !== skipChildName) {\n const breakTag = cb(child as T, i++);\n if (breakTag) {\n return;\n }\n }\n child = child._next;\n }\n }\n }\n\n getColGroup(col: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.col === col) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n getRowGroup(row: number) {\n let c = this._firstChild as Group;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === row) {\n return c;\n }\n c = c._next as Group;\n }\n return null;\n }\n\n addCellGroup(cellGroup: Group) {\n if (this.childrenCount === 0 || (this.lastChild as Group).row === cellGroup.row - 1) {\n this.addChild(cellGroup);\n } else {\n // for promise cell row order in column\n let c = this._firstChild as Group;\n for (let i = 0; i < this.childrenCount; i++) {\n if (c.row === cellGroup.row - 1) {\n this.insertAfter(cellGroup, c);\n return;\n }\n c = c._next as Group;\n }\n this.addChild(cellGroup);\n }\n }\n\n getChildAt(index: number) {\n const child = super.getChildAt(index);\n if (child && child.name === 'border-rect') {\n return child._next;\n }\n return child;\n }\n\n protected tryUpdateAABBBounds(): AABBBounds {\n if (this.role === 'cell') {\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds as AABBBounds;\n }\n // application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const selfChange = this.shouldSelfChangeUpdateAABBBounds();\n // const selfChange = true;\n const bounds = this.doUpdateAABBBounds();\n this.addUpdateLayoutTag();\n // application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange);\n after(this, selfChange);\n\n return bounds;\n }\n return super.tryUpdateAABBBounds() as AABBBounds;\n }\n\n // 目前优化方案会导致合并单元格无法正常更新列宽(因为合并单元格更新bounds不会触发父节点bounds更新),暂时关闭优化方案\n // shouldUpdateAABBBoundsForRowMerge(): boolean {\n\n // }\n\n // shouldUpdateAABBBounds(): boolean {\n // return this.shouldSelfChangeUpdateAABBBounds();\n // // // 检索自己是否需要更新\n // // if (super.shouldUpdateAABBBounds()) {\n // // return true;\n // // }\n // // // 检索叶子节点是否有更新(如果children是叶子节点的话)\n // // if (this._childUpdateTag & UpdateTag.UPDATE_BOUNDS) {\n // // return true;\n // // }\n // // // 检索是否子group需要更新\n // // let needUpdate = false;\n // // this.forEachChildren((node: IGraphic) => {\n // // // 只查找group层级\n // // if (node.isContainer && (node as Group).shouldUpdateAABBBounds()) {\n // // needUpdate = true;\n // // return true;\n // // }\n // // return false;\n // // });\n // // return needUpdate;\n // }\n\n protected doUpdateAABBBounds(): any {\n // const groupTheme = getTheme(this).group;\n // debugger;\n if (this.role === 'cell') {\n const attribute = this.attribute;\n const { x, y, width, height } = attribute;\n this._AABBBounds.setValue(x, y, x + width, y + height);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n return this._AABBBounds;\n } else if (\n this.role === 'body' ||\n this.role === 'row-header' ||\n this.role === 'col-header' ||\n this.role === 'right-frozen' ||\n this.role === 'bottom-frozen' ||\n this.role === 'corner-header' ||\n this.role === 'corner-right-top-header' ||\n this.role === 'corner-right-bottom-header' ||\n this.role === 'corner-left-bottom-header'\n ) {\n // Infinity bounds for manual clip group\n this._AABBBounds.setValue(-Infinity, -Infinity, Infinity, Infinity);\n // 更新bounds之后需要设置父节点,否则tag丢失\n this.parent && this.parent.addChildUpdateBoundTag();\n this.clearUpdateBoundTag();\n\n if (this.shadowRoot) {\n // this.shadowRoot.clearUpdateBoundTag();\n this.shadowRoot.tryUpdateAABBBounds();\n }\n return this._AABBBounds;\n }\n return super.doUpdateAABBBounds();\n // _AABBBounds\n // const bounds = graphicService.updateGroupAABBBounds(\n // attribute,\n // getTheme(this).group,\n // this._AABBBounds,\n // this\n // ) as AABBBounds;\n\n // const { boundsPadding = groupTheme.boundsPadding } = attribute;\n // const paddingArray = parsePadding(boundsPadding);\n // if (paddingArray) {\n // bounds.expand(paddingArray);\n // }\n // // 更新bounds之后需要设置父节点,否则tag丢失\n // this.parent && this.parent.addChildUpdateBoundTag();\n // this.clearUpdateBoundTag();\n\n // this.emit('AAABBBoundsChange');\n }\n\n // update column group row number\n updateColumnRowNumber(row: number) {\n if (!this.rowNumber) {\n this.rowNumber = row;\n } else {\n this.rowNumber = Math.max(this.rowNumber, row);\n }\n }\n\n // update column height\n updateColumnHeight(cellHeight: number) {\n if (!this.colHeight) {\n this.colHeight = cellHeight;\n } else {\n this.colHeight += cellHeight;\n }\n }\n\n // doUpdateLocalMatrix() {\n // const oldX = this.attribute.x;\n // const oldY = this.attribute.y;\n // this.attribute.x = Math.floor(this.attribute.x);\n // this.attribute.y = Math.floor(this.attribute.y);\n // super.doUpdateLocalMatrix();\n // this.attribute.x = oldX;\n // this.attribute.y = oldY;\n // }\n}\n\nfunction after(group: Group, selfChange: boolean) {\n if (!group.stage || !group.stage.dirtyBounds || !group.stage.renderCount) {\n return;\n }\n // group的子元素导致的bounds更新不用做dirtyBounds\n if (group.isContainer && !selfChange) {\n return;\n }\n group.stage.dirty(group.globalAABBBounds);\n}\n\n// function dealWidthSize(values: any, attributes: any) {\n// const x = values.x ?? attributes.oldx ?? attributes.x ?? 0 + values.dx ?? attributes.dx ?? 0;\n// const y = values.y ?? attributes.oldy ?? attributes.y ?? 0 + values.dy ?? attributes.dy ?? 0;\n// const width = values.width ?? attributes.oldwidth ?? attributes.width ?? 0;\n// const height = values.height ?? attributes.oldheight ?? attributes.height ?? 0;\n// isNumber(values.width) && (values.oldwidth = values.width);\n// isNumber(values.height) && (values.oldheight = values.height);\n// isNumber(values.x) && (values.oldx = values.x);\n// isNumber(values.y) && (values.oldy = values.y);\n\n// if (Math.floor(x + width) > Math.floor(width) + Math.floor(x)) {\n// values.width = Math.ceil(width);\n// } else {\n// values.width = Math.floor(width);\n// }\n\n// if (Math.floor(y + height) > Math.floor(height) + Math.floor(y)) {\n// values.height = Math.ceil(height);\n// } else {\n// values.height = Math.floor(height);\n// }\n// isNumber(values.x) && (values.x = Math.floor(values.x));\n// isNumber(values.y) && (values.y = Math.floor(values.y));\n// }\n"]}
|
package/es/vrender.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/vrender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AACxH,OAAO,EACL,cAAc,EACd,WAAW,EACX,WAAW,EAGX,cAAc,EAEd,aAAa,EACb,aAAa,EACb,YAAY,EAIZ,YAAY,EAEZ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAIhC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,MAAM,UAAU,kBAAkB;IAChC,IAAI,QAAQ,EAAE;QACZ,OAAO;KACR;IACD,QAAQ,GAAG,IAAI,CAAC;IAEhB,gBAAgB,EAAE,CAAC;IAEnB,IAAI,YAAY,EAAE,EAAE;QAClB,cAAc,CAAC,SAAS,CAAC,CAAC;KAC3B;SAAM,IAAI,SAAS,EAAE,EAAE;QACtB,WAAW,CAAC,SAAS,CAAC,CAAC;KACxB;IACD,WAAW,EAAE,CAAC;IAGd,cAAc,EAAE,CAAC;IAEjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IAIf,YAAY,EAAE,CAAC;IAEf,gBAAgB,EAAE,CAAC;IACnB,kBAAkB,EAAE,CAAC;IACrB,cAAc,EAAE,CAAC;IACjB,YAAY,EAAE,CAAC;IACf,wBAAwB,EAAE,CAAC;IAE3B,UAAU,EAAE,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-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,8BAA8B,CAAC","file":"vrender.js","sourcesContent":["import { loadPoptip } from '@visactor/vrender-components';\nimport '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule, registerFlexLayoutPlugin } from '@visactor/vrender-core';\nimport {\n loadBrowserEnv,\n loadNodeEnv,\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\n// export const version = \"1.7.1\";\n\nlet registed = false;\nexport function registerForVrender() {\n if (registed) {\n return;\n }\n registed = true;\n // 注册内置组件\n preLoadAllModule();\n\n if (isBrowserEnv()) {\n loadBrowserEnv(container);\n } else if (isNodeEnv()) {\n loadNodeEnv(container);\n }\n registerArc();\n // registerArc3d();\n // registerArea();\n registerCircle();\n // registerGlyph();\n registerGroup();\n registerImage();\n registerLine();\n // registerPath();\n // registerPolygon();\n // registerPyramid3d();\n registerRect();\n // registerRect3d();\n registerRichtext();\n registerShadowRoot();\n registerSymbol();\n registerText();\n registerFlexLayoutPlugin();\n // registerWrapText();\n loadPoptip();\n}\n\nexport type { Direction, Timeline } from '@visactor/vrender-core';\nexport { GroupFadeIn } from '@visactor/vrender-core';\nexport { GroupFadeOut } from '@visactor/vrender-core';\n\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-components';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vtable",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "canvas table width high performance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"grid",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@visactor/vdataset": "~0.18.1",
|
|
46
46
|
"@visactor/vutils-extension": "~1.11.5",
|
|
47
47
|
"cssfontparser": "^1.2.1",
|
|
48
|
-
"@visactor/vtable-editors": "1.7.
|
|
48
|
+
"@visactor/vtable-editors": "1.7.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"luxon": "*",
|
|
@@ -95,8 +95,8 @@
|
|
|
95
95
|
"d3-hierarchy": "^3.1.1",
|
|
96
96
|
"@resvg/resvg-js": "^2.5.0",
|
|
97
97
|
"pikaday": "1.8.2",
|
|
98
|
-
"@internal/ts-config": "0.0.1",
|
|
99
98
|
"@internal/bundler": "0.0.1",
|
|
99
|
+
"@internal/ts-config": "0.0.1",
|
|
100
100
|
"@internal/eslint-config": "0.0.1"
|
|
101
101
|
},
|
|
102
102
|
"unpkg": "latest",
|