@visactor/vtable 0.20.1 → 0.20.2-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/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/contributions/group-contribution-render.js +28 -6
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +9 -2
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +22 -19
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +21 -18
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js +21 -18
- package/cjs/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js +11 -10
- package/cjs/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js +7 -7
- package/cjs/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/cjs/scenegraph/utils/cell-border-stroke-width.d.ts +3 -0
- package/cjs/scenegraph/utils/cell-border-stroke-width.js +16 -0
- package/cjs/scenegraph/utils/cell-border-stroke-width.js.map +1 -0
- package/cjs/scenegraph/utils/text-icon-layout.js +9 -3
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/themes/theme.d.ts +3 -0
- package/cjs/themes/theme.js +14 -0
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +3 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +177 -26
- package/dist/vtable.min.js +2 -2
- 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/contributions/group-contribution-render.js +28 -5
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +9 -2
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +23 -18
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +22 -17
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/image-cell.js +8 -6
- package/es/scenegraph/group-creater/cell-type/image-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js +22 -17
- package/es/scenegraph/group-creater/cell-type/spark-line-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/text-cell.js +11 -9
- package/es/scenegraph/group-creater/cell-type/text-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/video-cell.js +8 -6
- package/es/scenegraph/group-creater/cell-type/video-cell.js.map +1 -1
- package/es/scenegraph/utils/cell-border-stroke-width.d.ts +3 -0
- package/es/scenegraph/utils/cell-border-stroke-width.js +10 -0
- package/es/scenegraph/utils/cell-border-stroke-width.js.map +1 -0
- package/es/scenegraph/utils/text-icon-layout.js +9 -3
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/themes/theme.d.ts +3 -0
- package/es/themes/theme.js +14 -0
- package/es/themes/theme.js.map +1 -1
- package/es/ts-types/theme.d.ts +3 -0
- package/es/ts-types/theme.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/cjs/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { updateCell } from './scenegraph/group-creater/cell-helper';
|
|
|
15
15
|
import { renderChart } from './scenegraph/graphic/contributions/chart-render-helper';
|
|
16
16
|
export { getDataCellPath } from './tools/get-data-path';
|
|
17
17
|
export * from './render/jsx';
|
|
18
|
-
export declare const version = "0.20.
|
|
18
|
+
export declare const version = "0.20.2-alpha.3";
|
|
19
19
|
export { TYPES, core, ListTable, ListTableConstructorOptions, PivotTable, PivotTableConstructorOptions, PivotChartConstructorOptions, PivotChart, 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 };
|
|
20
20
|
declare function getIcons(): {
|
|
21
21
|
[key: string]: TYPES.ColumnIconOption;
|
package/cjs/index.js
CHANGED
|
@@ -128,6 +128,6 @@ Object.defineProperty(exports, "getDataCellPath", {
|
|
|
128
128
|
get: function() {
|
|
129
129
|
return get_data_path_1.getDataCellPath;
|
|
130
130
|
}
|
|
131
|
-
}), __exportStar(require("./render/jsx"), exports), exports.version = "0.20.
|
|
131
|
+
}), __exportStar(require("./render/jsx"), exports), exports.version = "0.20.2-alpha.3",
|
|
132
132
|
exports.getIcons = getIcons, exports.clearGlobal = clearGlobal, TYPES.AggregationType;
|
|
133
133
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAA4D;AA6F1D,4FA7FO,qBAAW,OA6FP;AA5Fb,IAAA,4BA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AAe,OAAA;AACxB,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAmDxC,SAAS,QAAQ;IAGf,OAAO,KAAK,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;AAnBC,4BAAQ;AAqBV,SAAS,WAAW;IAClB,QAAQ,CAAC,QAAQ,EAAE,CAAC;AAGtB,CAAC;AAxBC,kCAAW;AAyBb,KAAK,CAAC,eAAe,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 IHeaderTreeDefine,\n IDimension,\n IIndicator,\n ITitleDefine,\n ICornerDefine,\n TextAlignType,\n TextBaselineType\n} from './ts-types';\nimport { ListTable } from './ListTable';\nimport { PivotTable } from './PivotTable';\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';\n\n// import { container, loadCanvasPicker } from '@src/vrender';\n// loadCanvasPicker(container);\n\nexport { getDataCellPath } from './tools/get-data-path';\nexport * from './render/jsx';\n\nexport const version = \"0.20.2-alpha.3\";\n/**\n * @namespace VTable\n */\nexport {\n /**\n * Types\n * @namespace VTable.TYPES\n */\n TYPES,\n core,\n ListTable,\n ListTableConstructorOptions,\n PivotTable,\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 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};\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"]}
|
|
@@ -37,8 +37,15 @@ let SplitGroupAfterRenderContribution = class {
|
|
|
37
37
|
let widthForStroke, heightForStroke;
|
|
38
38
|
if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {
|
|
39
39
|
if ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const table = group.stage.table;
|
|
41
|
+
let deltaWidth = 0, deltaHeight = 0;
|
|
42
|
+
if ("bottom-right" === table.theme.cellBorderClipDirection) {
|
|
43
|
+
if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
|
|
44
|
+
const col = group.col, row = group.row;
|
|
45
|
+
table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
|
|
46
|
+
}
|
|
47
|
+
} else x = Math.floor(x) + .5, y = Math.floor(y) + .5;
|
|
48
|
+
const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
|
|
42
49
|
widthForStroke = widthFroDraw, heightForStroke = heightFroDraw;
|
|
43
50
|
} else widthForStroke = Math.ceil(width), heightForStroke = Math.ceil(height);
|
|
44
51
|
renderStroke(group, context, x, y, groupAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, widthForStroke, heightForStroke);
|
|
@@ -123,8 +130,15 @@ let DashGroupAfterRenderContribution = class {
|
|
|
123
130
|
if (!stroke || !Array.isArray(lineDash) || !lineDash.length || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) return;
|
|
124
131
|
let widthForStroke, heightForStroke, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
|
|
125
132
|
if (width = Math.ceil(width), height = Math.ceil(height), 1 & lineWidth) {
|
|
126
|
-
|
|
127
|
-
|
|
133
|
+
const table = group.stage.table;
|
|
134
|
+
let deltaWidth = 0, deltaHeight = 0;
|
|
135
|
+
if ("bottom-right" === table.theme.cellBorderClipDirection) {
|
|
136
|
+
if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
|
|
137
|
+
const col = group.col, row = group.row;
|
|
138
|
+
table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
|
|
139
|
+
}
|
|
140
|
+
} else x = Math.floor(x) + .5, y = Math.floor(y) + .5;
|
|
141
|
+
const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
|
|
128
142
|
widthForStroke = widthFroDraw, heightForStroke = heightFroDraw;
|
|
129
143
|
} else widthForStroke = Math.ceil(width), heightForStroke = Math.ceil(height);
|
|
130
144
|
context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.beginPath(),
|
|
@@ -164,8 +178,16 @@ let AdjustPosGroupAfterRenderContribution = class {
|
|
|
164
178
|
const {lineWidth: lineWidth = groupAttribute.lineWidth, stroke: stroke = groupAttribute.stroke, lineDash: lineDash = groupAttribute.lineDash, strokeArrayWidth: strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor: strokeArrayColor = groupAttribute.strokeArrayColor, notAdjustPos: notAdjustPos, cornerRadius: cornerRadius = groupAttribute.cornerRadius} = group.attribute, {width: width = groupAttribute.width, height: height = groupAttribute.height} = group.attribute;
|
|
165
179
|
if (!0 !== notAdjustPos && stroke && Array.isArray(lineDash) && !lineDash.length && !Array.isArray(strokeArrayColor) && !Array.isArray(strokeArrayWidth) && 1 & lineWidth) {
|
|
166
180
|
const {width: widthFroDraw, height: heightFroDraw} = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
|
|
167
|
-
context.beginPath()
|
|
168
|
-
|
|
181
|
+
context.beginPath();
|
|
182
|
+
const table = group.stage.table;
|
|
183
|
+
let deltaWidth = 0, deltaHeight = 0;
|
|
184
|
+
if ("bottom-right" === table.theme.cellBorderClipDirection) {
|
|
185
|
+
if (x = Math.floor(x) - .5, y = Math.floor(y) - .5, "cell" === group.role) {
|
|
186
|
+
const col = group.col, row = group.row;
|
|
187
|
+
table && col === table.colCount - 1 && (deltaWidth = 1), table && row === table.rowCount - 1 && (deltaHeight = 1);
|
|
188
|
+
}
|
|
189
|
+
} else x = Math.floor(x) + .5, y = Math.floor(y) + .5;
|
|
190
|
+
cornerRadius ? (0, vrender_1.createRectPath)(context, x, y, widthFroDraw + deltaWidth, heightFroDraw + deltaHeight, cornerRadius) : context.rect(x, y, widthFroDraw, heightFroDraw),
|
|
169
191
|
context.setStrokeStyle(group, group.attribute, x, y, groupAttribute), context.stroke();
|
|
170
192
|
}
|
|
171
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAWA,gDAA4F;AAE5F,sEAAuE;AAGvE,+DAA8D;AAC9D,gDAAqD;AAO9C,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAA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GAAG,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;YACvC,KAAK,IAAI,CAAC,CAAC;SACZ;aAAM,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,KAAK,CAAC,UAAU,EAAE;YACxE,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,QAAQ,GAAG,CAAC,EAAE;YACvC,MAAM,IAAI,CAAC,CAAC;SACb;aAAM,IAAI,KAAK,IAAI,GAAG,KAAK,KAAK,CAAC,cAAc,GAAG,CAAC,IAAI,KAAK,CAAC,SAAS,EAAE;YACvE,MAAM,IAAI,CAAC,CAAC;SACb;KACF;SAAM,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE;QACzC,IAAI,KAAK,CAAC,UAAU,EAAE;YACpB,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,MAAM,IAAI,CAAC,CAAC;SACb;KACF;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC","file":"group-contribution-render.js","sourcesContent":["import type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution,\n IDrawContext,\n IRectGraphicAttribute\n} from './../../../vrender';\nimport { BaseRenderContributionTime, createRectPath, injectable } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getQuadProps } from '../../utils/padding';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\n\n// const highlightDash: number[] = [];\n\n// SplitGroupContribution处理分段渲染stroke\n// stroke/strokeArrayWidth/strokeArrayColor 为数组时调用\n@injectable()\nexport class SplitGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n stroke = groupAttribute.stroke,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n } = group.attribute as any;\n\n if (stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n\n // if (highlightStroke) {\n // // 依据highlightStroke信息调整clip范围,以实现在单个单元格显示highlight border\n // let xDist = x;\n // let yDist = y;\n // let widthDist = width;\n // let heightDist = height;\n // if (highlightStroke[0] && highlightStrokeArrayWidth[0]) {\n // // top\n // yDist -= highlightStrokeArrayWidth[0] / 2;\n // heightDist += highlightStrokeArrayWidth[0] / 2;\n // }\n // if (highlightStroke[1] && highlightStrokeArrayWidth[1]) {\n // // right\n // widthDist += highlightStrokeArrayWidth[1] / 2;\n // }\n // if (highlightStroke[2] && highlightStrokeArrayWidth[2]) {\n // // bottom\n // heightDist += highlightStrokeArrayWidth[2] / 2;\n // }\n // if (highlightStroke[3] && highlightStrokeArrayWidth[3]) {\n // // left\n // xDist -= highlightStrokeArrayWidth[3] / 2;\n // widthDist += highlightStrokeArrayWidth[3] / 2;\n // }\n\n // context.beginPath();\n // context.rect(xDist, yDist, widthDist, heightDist);\n // }\n }\n}\n@injectable()\nexport class SplitGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n width = groupAttribute.width,\n height = groupAttribute.height,\n // 基础border\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n\n lineWidth = groupAttribute.lineWidth,\n strokeColor = groupAttribute.stroke\n // // select & hover border\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (groupAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (groupAttribute as any).highlightStrokeArrayPart,\n } = group.attribute as any;\n\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke;\n let heightForStroke;\n if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n renderStroke(\n group,\n context,\n x,\n y,\n groupAttribute,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n // Math.ceil(width),\n // Math.ceil(height)\n widthForStroke,\n heightForStroke\n );\n }\n }\n}\n\n/**\n * @description: 判断线宽是否需要分别渲染(线宽不同)\n * @param {number} widthArray\n * @return {*}\n */\nexport function getWidthInfo(widthArray: number[] | number) {\n if (!Array.isArray(widthArray)) {\n return {\n isSplitDraw: false,\n width: widthArray\n };\n }\n\n let temp;\n for (let i = 0; i < widthArray.length; i++) {\n const width = widthArray[i];\n if (width) {\n if (!temp) {\n temp = width;\n } else if (width !== temp) {\n return {\n isSplitDraw: true\n };\n }\n }\n }\n\n return {\n isSplitDraw: false,\n width: temp\n };\n}\n\nexport function renderStroke(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n groupAttribute: Required<IGroupGraphicAttribute> | Required<IRectGraphicAttribute>,\n stroke: boolean | [boolean, boolean, boolean, boolean],\n strokeArrayWidth: [number, number, number, number] | undefined,\n strokeArrayColor: [string, string, string, string] | undefined,\n width: number,\n height: number,\n isHighlight?: boolean,\n part?: ([number, number] | undefined)[]\n) {\n const widthInfo = getWidthInfo(strokeArrayWidth);\n const isWidthNumber = !Array.isArray(strokeArrayWidth);\n const isStrokeTrue = !Array.isArray(stroke);\n // 渲染部分线段,part: [[0, 0.5], undifined, undifined, undifined]\n // 同样上右下左,范围0-1,[0, 0.5]即只渲染前一半\n const isPart = Array.isArray(part);\n const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;\n\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // if (isHighlight) {\n // context.setLineDash(highlightDash);\n // context.lineCap = 'square';\n // }\n const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n // top\n if ((isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0])) {\n // context.lineTo(x + width, y);\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x + width * part[0][0], y);\n context.lineTo(x + width * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x + width, y);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[0]) {\n context.strokeStyle = strokeArrayColor[0];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[0];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y);\n }\n } else {\n context.moveTo(x + width, y);\n }\n // right\n if ((isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1])) {\n // context.lineTo(x + width, y + height);\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y + height * part[1][0]);\n context.lineTo(x + width, y + height * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height);\n } else {\n context.moveTo(x + width, y);\n context.lineTo(x + width, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[1]) {\n context.strokeStyle = strokeArrayColor[1];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[1];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y + height);\n }\n } else {\n context.moveTo(x + width, y + height);\n }\n // bottom\n if ((isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2])) {\n // context.lineTo(x, y + height);\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x + width * part[2][0], y + height);\n context.lineTo(x + width * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x, y + height);\n } else {\n context.moveTo(x, y + height);\n context.lineTo(x + width, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[2]) {\n context.strokeStyle = strokeArrayColor[2];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[2];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n context.beginPath();\n context.moveTo(x, y + height);\n }\n } else {\n context.moveTo(x, y + height);\n }\n // left\n if ((isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3])) {\n // context.lineTo(x, y);\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y + height * part[3][0]);\n context.lineTo(x, y + height * (part[3][1] - part[3][0]));\n context.moveTo(x, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[3]) {\n context.strokeStyle = strokeArrayColor[3];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[3];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n context.beginPath();\n context.moveTo(x, y);\n }\n } else {\n context.moveTo(x, y);\n }\n\n if (!isSplitDraw && !isDash) {\n // context.strokeStyle = strokeArrayColor;\n if (!isWidthNumber && widthInfo.width) {\n context.lineWidth = widthInfo.width;\n }\n context.stroke();\n }\n}\n\n// DashGroupContribution处理虚线边框对齐\n// lineDash 为非空数组时调用\n@injectable()\nexport class DashGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth\n } = group.attribute as any;\n\n if (\n stroke &&\n Array.isArray(lineDash) &&\n lineDash.length &&\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth)\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n@injectable()\nexport class DashGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n lineWidth = groupAttribute.lineWidth\n } = group.attribute as any;\n\n if (\n !stroke ||\n !(Array.isArray(lineDash) && lineDash.length) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // 分段设置lineDashOffset,实现虚线边框对齐\n // top\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x + widthForStroke, y);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n\n // right\n context.beginPath();\n context.moveTo(x + widthForStroke, y);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n\n // bottom\n context.beginPath();\n context.moveTo(x, y + heightForStroke);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n\n // left\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n }\n}\n\n// AdjustPosGroupContribution处理线宽为奇数时stroke位置偏移0.5px\n// lineWidth 为奇数时调用\n@injectable()\nexport class AdjustPosGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos\n } = group.attribute as any;\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class AdjustPosGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos,\n cornerRadius = groupAttribute.cornerRadius\n } = group.attribute as any;\n\n const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n // width = Math.ceil(width);\n // height = Math.ceil(height);\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n // if (group.role === 'cell') {\n // const table = (group.stage as any).table as BaseTableAPI;\n // let col = (group as any).col as number;\n // let row = (group as any).row as number;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // col = mergeInfo.end.col;\n // row = mergeInfo.end.row;\n // }\n\n // if (table && col === table.colCount - 1) {\n // width -= 1;\n // } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n // width -= 1;\n // }\n // if (table && row === table.rowCount - 1) {\n // height -= 1;\n // } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n // height -= 1;\n // }\n // }\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n context.beginPath();\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n if (cornerRadius) {\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, widthFroDraw, heightFroDraw, cornerRadius);\n } else {\n context.rect(x, y, widthFroDraw, heightFroDraw);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n context.stroke();\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'cell') {\n const table = (group.stage as any).table as BaseTableAPI;\n if (table.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHoverFill = hoverColor;\n }\n }\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group.attribute as any)._vtableHoverFill) {\n if (fillCb) {\n // do nothing\n // fillCb(context, group.attribute, groupAttribute);\n } else if (fVisible) {\n const oldColor = group.attribute.fill;\n // draw hover fill\n group.attribute.fill = (group.attribute as any)._vtableHoverFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHoverFill = undefined;\n }\n }\n }\n}\n\n@injectable()\nexport class ClipBodyGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if ((group as Group).role === 'body') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'row-header') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'col-header') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'right-frozen') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'bottom-frozen') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-right-top-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-right-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-left-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n }\n }\n}\n@injectable()\nexport class ClipBodyGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'body') {\n }\n }\n}\n\nfunction getCellSizeForDraw(group: any, width: number, height: number) {\n const table = group.stage.table as BaseTableAPI;\n if (group.role === 'cell') {\n let col = group.col as number;\n let row = group.row as number;\n const mergeInfo = getCellMergeInfo(table, col, row);\n if (mergeInfo) {\n col = mergeInfo.end.col;\n row = mergeInfo.end.row;\n }\n\n if (table && col === table.colCount - 1) {\n width -= 1;\n } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n width -= 1;\n }\n if (table && row === table.rowCount - 1) {\n height -= 1;\n } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n height -= 1;\n }\n } else if (group.role === 'corner-frozen') {\n if (table.scrollLeft) {\n width -= 1;\n }\n if (table.scrollTop) {\n height -= 1;\n }\n }\n return { width, height };\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAWA,gDAA4F;AAE5F,sEAAuE;AAGvE,+DAA8D;AAC9D,gDAAqD;AAO9C,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,oCAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAG,IAAI,CAAC;QAChB,UAAK,GAAG,CAAC,CAAC;IAmEZ,CAAC;IAlEC,SAAS,CACP,KAAa,EACb,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,cAAgD,EAChD,WAAyB,EACzB,MAIY,EACZ,QAIY,EACZ,cAAuD;QAEvD,MAAM,EACJ,MAAM,GAAG,cAAc,CAAC,MAAM,EAC9B,gBAAgB,GAAI,cAAsB,CAAC,gBAAgB,EAC3D,gBAAgB,GAAI,cAAsB,C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M,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe,EAAE;QACzC,IAAI,KAAK,CAAC,UAAU,EAAE;YACpB,KAAK,IAAI,CAAC,CAAC;SACZ;QACD,IAAI,KAAK,CAAC,SAAS,EAAE;YACnB,MAAM,IAAI,CAAC,CAAC;SACb;KACF;IACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC","file":"group-contribution-render.js","sourcesContent":["import type {\n IGroup,\n IContext2d,\n IGroupGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IGroupRenderContribution,\n IDrawContext,\n IRectGraphicAttribute\n} from './../../../vrender';\nimport { BaseRenderContributionTime, createRectPath, injectable } from './../../../vrender';\nimport type { Group } from '../group';\nimport { getCellHoverColor } from '../../../state/hover/is-cell-hover';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { getQuadProps } from '../../utils/padding';\nimport { getCellMergeInfo } from '../../utils/get-cell-merge';\nimport { InteractionState } from '../../../ts-types';\n\n// const highlightDash: number[] = [];\n\n// SplitGroupContribution处理分段渲染stroke\n// stroke/strokeArrayWidth/strokeArrayColor 为数组时调用\n@injectable()\nexport class SplitGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n stroke = groupAttribute.stroke,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n } = group.attribute as any;\n\n if (stroke && (Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n\n // if (highlightStroke) {\n // // 依据highlightStroke信息调整clip范围,以实现在单个单元格显示highlight border\n // let xDist = x;\n // let yDist = y;\n // let widthDist = width;\n // let heightDist = height;\n // if (highlightStroke[0] && highlightStrokeArrayWidth[0]) {\n // // top\n // yDist -= highlightStrokeArrayWidth[0] / 2;\n // heightDist += highlightStrokeArrayWidth[0] / 2;\n // }\n // if (highlightStroke[1] && highlightStrokeArrayWidth[1]) {\n // // right\n // widthDist += highlightStrokeArrayWidth[1] / 2;\n // }\n // if (highlightStroke[2] && highlightStrokeArrayWidth[2]) {\n // // bottom\n // heightDist += highlightStrokeArrayWidth[2] / 2;\n // }\n // if (highlightStroke[3] && highlightStrokeArrayWidth[3]) {\n // // left\n // xDist -= highlightStrokeArrayWidth[3] / 2;\n // widthDist += highlightStrokeArrayWidth[3] / 2;\n // }\n\n // context.beginPath();\n // context.rect(xDist, yDist, widthDist, heightDist);\n // }\n }\n}\n@injectable()\nexport class SplitGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n width = groupAttribute.width,\n height = groupAttribute.height,\n // 基础border\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n\n lineWidth = groupAttribute.lineWidth,\n strokeColor = groupAttribute.stroke\n // // select & hover border\n // highlightStroke = (groupAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (groupAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (groupAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (groupAttribute as any).highlightStrokeArrayPart,\n } = group.attribute as any;\n\n // lineWidth === 0 不绘制\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n let widthForStroke;\n let heightForStroke;\n if (Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n if (\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n let deltaWidth = 0;\n let deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width + deltaWidth),\n Math.ceil(height + deltaHeight)\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n renderStroke(\n group,\n context,\n x,\n y,\n groupAttribute,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n // Math.ceil(width),\n // Math.ceil(height)\n widthForStroke,\n heightForStroke\n );\n }\n }\n}\n\n/**\n * @description: 判断线宽是否需要分别渲染(线宽不同)\n * @param {number} widthArray\n * @return {*}\n */\nexport function getWidthInfo(widthArray: number[] | number) {\n if (!Array.isArray(widthArray)) {\n return {\n isSplitDraw: false,\n width: widthArray\n };\n }\n\n let temp;\n for (let i = 0; i < widthArray.length; i++) {\n const width = widthArray[i];\n if (width) {\n if (!temp) {\n temp = width;\n } else if (width !== temp) {\n return {\n isSplitDraw: true\n };\n }\n }\n }\n\n return {\n isSplitDraw: false,\n width: temp\n };\n}\n\nexport function renderStroke(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n groupAttribute: Required<IGroupGraphicAttribute> | Required<IRectGraphicAttribute>,\n stroke: boolean | [boolean, boolean, boolean, boolean],\n strokeArrayWidth: [number, number, number, number] | undefined,\n strokeArrayColor: [string, string, string, string] | undefined,\n width: number,\n height: number,\n isHighlight?: boolean,\n part?: ([number, number] | undefined)[]\n) {\n const widthInfo = getWidthInfo(strokeArrayWidth);\n const isWidthNumber = !Array.isArray(strokeArrayWidth);\n const isStrokeTrue = !Array.isArray(stroke);\n // 渲染部分线段,part: [[0, 0.5], undifined, undifined, undifined]\n // 同样上右下左,范围0-1,[0, 0.5]即只渲染前一半\n const isPart = Array.isArray(part);\n const isSplitDraw = Array.isArray(strokeArrayColor) || widthInfo.isSplitDraw;\n\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // if (isHighlight) {\n // context.setLineDash(highlightDash);\n // context.lineCap = 'square';\n // }\n const lineDash = context.getLineDash();\n let isDash = false;\n if (lineDash.length) {\n isDash = true;\n }\n // 单独处理每条边界,目前不考虑圆角\n context.beginPath();\n context.moveTo(x, y);\n\n // top\n if ((isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0])) {\n // context.lineTo(x + width, y);\n if (isPart && Array.isArray(part[0])) {\n context.moveTo(x + width * part[0][0], y);\n context.lineTo(x + width * (part[0][1] - part[0][0]), y);\n context.moveTo(x + width, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x + width, y);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[0]) {\n context.strokeStyle = strokeArrayColor[0];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[0];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y);\n }\n } else {\n context.moveTo(x + width, y);\n }\n // right\n if ((isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1])) {\n // context.lineTo(x + width, y + height);\n if (isPart && Array.isArray(part[1])) {\n context.moveTo(x + width, y + height * part[1][0]);\n context.lineTo(x + width, y + height * (part[1][1] - part[1][0]));\n context.moveTo(x + width, y + height);\n } else {\n context.moveTo(x + width, y);\n context.lineTo(x + width, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[1]) {\n context.strokeStyle = strokeArrayColor[1];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[1];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n context.beginPath();\n context.moveTo(x + width, y + height);\n }\n } else {\n context.moveTo(x + width, y + height);\n }\n // bottom\n if ((isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2])) {\n // context.lineTo(x, y + height);\n if (isPart && Array.isArray(part[2])) {\n context.moveTo(x + width * part[2][0], y + height);\n context.lineTo(x + width * (part[2][1] - part[2][0]), y + height);\n context.moveTo(x, y + height);\n } else {\n context.moveTo(x, y + height);\n context.lineTo(x + width, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[2]) {\n context.strokeStyle = strokeArrayColor[2];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[2];\n }\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n context.beginPath();\n context.moveTo(x, y + height);\n }\n } else {\n context.moveTo(x, y + height);\n }\n // left\n if ((isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3])) {\n // context.lineTo(x, y);\n if (isPart && Array.isArray(part[3])) {\n context.moveTo(x, y + height * part[3][0]);\n context.lineTo(x, y + height * (part[3][1] - part[3][0]));\n context.moveTo(x, y);\n } else {\n context.moveTo(x, y);\n context.lineTo(x, y + height);\n }\n if (isSplitDraw || isDash) {\n if (strokeArrayColor && strokeArrayColor[3]) {\n context.strokeStyle = strokeArrayColor[3];\n } else {\n context.strokeStyle = 'transparent';\n }\n if (!isWidthNumber) {\n context.lineWidth = strokeArrayWidth[3];\n }\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n context.beginPath();\n context.moveTo(x, y);\n }\n } else {\n context.moveTo(x, y);\n }\n\n if (!isSplitDraw && !isDash) {\n // context.strokeStyle = strokeArrayColor;\n if (!isWidthNumber && widthInfo.width) {\n context.lineWidth = widthInfo.width;\n }\n context.stroke();\n }\n}\n\n// DashGroupContribution处理虚线边框对齐\n// lineDash 为非空数组时调用\n@injectable()\nexport class DashGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth\n } = group.attribute as any;\n\n if (\n stroke &&\n Array.isArray(lineDash) &&\n lineDash.length &&\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth)\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n@injectable()\nexport class DashGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineDash = groupAttribute.lineDash,\n stroke = groupAttribute.stroke,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n lineWidth = groupAttribute.lineWidth\n } = group.attribute as any;\n\n if (\n !stroke ||\n !(Array.isArray(lineDash) && lineDash.length) ||\n Array.isArray(strokeArrayColor) ||\n Array.isArray(strokeArrayWidth)\n ) {\n return;\n }\n\n // const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n width = Math.ceil(width);\n height = Math.ceil(height);\n\n let widthForStroke;\n let heightForStroke;\n if (lineWidth & 1) {\n const table = (group.stage as any).table as BaseTableAPI;\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n let deltaWidth = 0;\n let deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width + deltaWidth),\n Math.ceil(height + deltaHeight)\n );\n widthForStroke = widthFroDraw;\n heightForStroke = heightFroDraw;\n } else {\n widthForStroke = Math.ceil(width);\n heightForStroke = Math.ceil(height);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n // 分段设置lineDashOffset,实现虚线边框对齐\n // top\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x + widthForStroke, y);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n\n // right\n context.beginPath();\n context.moveTo(x + widthForStroke, y);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n\n // bottom\n context.beginPath();\n context.moveTo(x, y + heightForStroke);\n context.lineTo(x + widthForStroke, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a;\n context.stroke();\n\n // left\n context.beginPath();\n context.moveTo(x, y);\n context.lineTo(x, y + heightForStroke);\n context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d;\n context.stroke();\n }\n}\n\n// AdjustPosGroupContribution处理线宽为奇数时stroke位置偏移0.5px\n// lineWidth 为奇数时调用\n@injectable()\nexport class AdjustPosGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n // width = groupAttribute.width,\n // height = groupAttribute.height,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos\n } = group.attribute as any;\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class AdjustPosGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n const {\n lineWidth = groupAttribute.lineWidth,\n stroke = groupAttribute.stroke,\n lineDash = groupAttribute.lineDash,\n strokeArrayWidth = (groupAttribute as any).strokeArrayWidth,\n strokeArrayColor = (groupAttribute as any).strokeArrayColor,\n notAdjustPos,\n cornerRadius = groupAttribute.cornerRadius\n } = group.attribute as any;\n\n const { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;\n // width = Math.ceil(width);\n // height = Math.ceil(height);\n\n if (\n notAdjustPos !== true && // 不需要调整位置\n stroke &&\n Array.isArray(lineDash) &&\n !lineDash.length && // 非虚线\n !Array.isArray(strokeArrayColor) &&\n !Array.isArray(strokeArrayWidth) &&\n lineWidth & 1 // 奇数线宽\n ) {\n // if (group.role === 'cell') {\n // const table = (group.stage as any).table as BaseTableAPI;\n // let col = (group as any).col as number;\n // let row = (group as any).row as number;\n // const mergeInfo = getCellMergeInfo(table, col, row);\n // if (mergeInfo) {\n // col = mergeInfo.end.col;\n // row = mergeInfo.end.row;\n // }\n\n // if (table && col === table.colCount - 1) {\n // width -= 1;\n // } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n // width -= 1;\n // }\n // if (table && row === table.rowCount - 1) {\n // height -= 1;\n // } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n // height -= 1;\n // }\n // }\n const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(\n group,\n Math.ceil(width),\n Math.ceil(height)\n );\n context.beginPath();\n const table = (group.stage as any).table as BaseTableAPI;\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n let deltaWidth = 0;\n let deltaHeight = 0;\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n if (group.role === 'cell') {\n const col = (group as any).col as number;\n const row = (group as any).row as number;\n if (table && col === table.colCount - 1) {\n deltaWidth = 1;\n }\n if (table && row === table.rowCount - 1) {\n deltaHeight = 1;\n }\n }\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n\n if (cornerRadius) {\n // 测试后,cache对于重绘性能提升不大,但是在首屏有一定性能损耗,因此rect不再使用cache\n createRectPath(context, x, y, widthFroDraw + deltaWidth, heightFroDraw + deltaHeight, cornerRadius);\n } else {\n context.rect(x, y, widthFroDraw, heightFroDraw);\n }\n context.setStrokeStyle(group, group.attribute, x, y, groupAttribute);\n context.stroke();\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'cell') {\n const table = (group.stage as any).table as BaseTableAPI;\n if (table.stateManager.interactionState !== InteractionState.scrolling) {\n const hoverColor = getCellHoverColor(group as Group, table);\n if (hoverColor) {\n (group.attribute as any)._vtableHoverFill = hoverColor;\n }\n }\n }\n }\n}\n\n@injectable()\nexport class AdjustColorGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group.attribute as any)._vtableHoverFill) {\n if (fillCb) {\n // do nothing\n // fillCb(context, group.attribute, groupAttribute);\n } else if (fVisible) {\n const oldColor = group.attribute.fill;\n // draw hover fill\n group.attribute.fill = (group.attribute as any)._vtableHoverFill as any;\n context.setCommonStyle(group, group.attribute, x, y, groupAttribute);\n context.fill();\n group.attribute.fill = oldColor;\n (group.attribute as any)._vtableHoverFill = undefined;\n }\n }\n }\n}\n\n@injectable()\nexport class ClipBodyGroupBeforeRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n const table = (group.stage as any).table as BaseTableAPI;\n if ((group as Group).role === 'body') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'row-header') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'col-header') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'right-frozen') {\n const x = 0;\n const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();\n const width = table.getRightFrozenColsWidth();\n const height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'bottom-frozen') {\n const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();\n const y = 0;\n const width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-right-top-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-right-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getRightFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n } else if ((group as Group).role === 'corner-left-bottom-header') {\n const x = 0;\n const y = 0;\n const width = table.getFrozenColsWidth();\n const height = table.getBottomFrozenRowsHeight();\n context.beginPath();\n context.rect(x, y, width, height);\n }\n }\n}\n@injectable()\nexport class ClipBodyGroupAfterRenderContribution implements IGroupRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle = true;\n order = 0;\n drawShape(\n group: IGroup,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n groupAttribute: Required<IGroupGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // 处理hover颜色\n if ((group as Group).role === 'body') {\n }\n }\n}\n\nfunction getCellSizeForDraw(group: any, width: number, height: number) {\n const table = group.stage.table as BaseTableAPI;\n if (group.role === 'cell') {\n let col = group.col as number;\n let row = group.row as number;\n const mergeInfo = getCellMergeInfo(table, col, row);\n if (mergeInfo) {\n col = mergeInfo.end.col;\n row = mergeInfo.end.row;\n }\n\n if (table && col === table.colCount - 1) {\n width -= 1;\n } else if (table && col === table.frozenColCount - 1 && table.scrollLeft) {\n width -= 1;\n }\n if (table && row === table.rowCount - 1) {\n height -= 1;\n } else if (table && row === table.frozenRowCount - 1 && table.scrollTop) {\n height -= 1;\n }\n } else if (group.role === 'corner-frozen') {\n if (table.scrollLeft) {\n width -= 1;\n }\n if (table.scrollTop) {\n height -= 1;\n }\n }\n return { width, height };\n}\n"]}
|
|
@@ -33,8 +33,15 @@ let SplitRectAfterRenderContribution = class {
|
|
|
33
33
|
}
|
|
34
34
|
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
35
35
|
const {width: width = rectAttribute.width, height: height = rectAttribute.height, stroke: stroke = rectAttribute.stroke, strokeArrayColor: strokeArrayColor = rectAttribute.strokeArrayColor, strokeArrayWidth: strokeArrayWidth = rectAttribute.strokeArrayWidth, lineWidth: lineWidth = rectAttribute.lineWidth, strokeColor: strokeColor = rectAttribute.stroke} = rect.attribute;
|
|
36
|
-
stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))
|
|
37
|
-
|
|
36
|
+
if (stroke && (Array.isArray(strokeArrayWidth) || 0 !== lineWidth) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
|
|
37
|
+
let deltaWidth = 0, deltaHeight = 0;
|
|
38
|
+
if ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some((width => 1 & width))) {
|
|
39
|
+
"bottom-right" === rect.stage.table.theme.cellBorderClipDirection ? (x = Math.floor(x) - .5,
|
|
40
|
+
y = Math.floor(y) - .5, deltaWidth = .5, deltaHeight = .5) : (x = Math.floor(x) + .5,
|
|
41
|
+
y = Math.floor(y) + .5);
|
|
42
|
+
}
|
|
43
|
+
(0, group_contribution_render_1.renderStroke)(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
|
|
44
|
+
}
|
|
38
45
|
}
|
|
39
46
|
};
|
|
40
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/graphic/contributions/rect-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAYA,gDAA4E;AAC5E,2EAA2D;
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/graphic/contributions/rect-contribution-render.ts"],"names":[],"mappings":";;;;;;;;;AAYA,gDAA4E;A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AAM;oBACL,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;oBACxB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;iBACzB;aACF;YACD,IAAA,wCAAY,EACV,IAAc,EACd,OAAO,EACP,CAAC,EACD,CAAC,EACD,aAAa,EACb,MAAM,EACN,gBAAgB,IAAI,SAAS,EAC7B,gBAAgB,IAAI,WAAW,EAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,EAC7B,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC,CAChC,CAAC;SACH;IACH,CAAC;CACF,CAAA;AA/HY,gCAAgC;IAD5C,IAAA,oBAAU,GAAE;GACA,gCAAgC,CA+H5C;AA/HY,4EAAgC;AAkI7C,SAAS,SAAS,CAAC,GAAW;IAC5B,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC","file":"rect-contribution-render.js","sourcesContent":["import type {\n IRect,\n IContext2d,\n IRectGraphicAttribute,\n IMarkAttribute,\n IGraphicAttribute,\n IThemeAttribute,\n IRectRenderContribution,\n IGroup,\n IGroupGraphicAttribute,\n IDrawContext\n} from './../../../vrender';\nimport { BaseRenderContributionTime, injectable } from './../../../vrender';\nimport { renderStroke } from './group-contribution-render';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\n\n@injectable()\nexport class SplitRectBeforeRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.beforeFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n doFillOrStroke?: { doFill: boolean; doStroke: boolean }\n ) {\n // const { stroke = rectAttribute.stroke } = group.attribute as any;\n\n // if (Array.isArray(stroke)) {\n // doFillOrStroke.doStroke = false;\n // }\n\n const {\n stroke = rectAttribute.stroke,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor\n } = rect.attribute as any;\n\n if (stroke && (Array.isArray(stroke) || Array.isArray(strokeArrayWidth) || Array.isArray(strokeArrayColor))) {\n doFillOrStroke.doStroke = false;\n }\n }\n}\n\n@injectable()\nexport class SplitRectAfterRenderContribution implements IRectRenderContribution {\n time: BaseRenderContributionTime = BaseRenderContributionTime.afterFillStroke;\n useStyle: boolean = true;\n order: number = 0;\n drawShape(\n rect: IRect,\n context: IContext2d,\n x: number,\n y: number,\n doFill: boolean,\n doStroke: boolean,\n fVisible: boolean,\n sVisible: boolean,\n rectAttribute: Required<IRectGraphicAttribute>,\n drawContext: IDrawContext,\n fillCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean,\n strokeCb?: (\n ctx: IContext2d,\n markAttribute: Partial<IMarkAttribute & IGraphicAttribute>,\n themeAttribute: IThemeAttribute\n ) => boolean\n ) {\n // const {\n // width = rectAttribute.width,\n // height = rectAttribute.height,\n // stroke = rectAttribute.stroke\n // } = group.attribute as any;\n\n // if (!Array.isArray(stroke)) {\n // return;\n // }\n\n // context.setStrokeStyle(group, group.attribute, x, y, rectAttribute);\n // // 单独处理每条边界,目前不考虑圆角\n // context.beginPath();\n // context.moveTo(x, y);\n // // top\n // if (stroke[0]) {\n // context.lineTo(x + width, y);\n // } else {\n // context.moveTo(x + width, y);\n // }\n // // right\n // if (stroke[1]) {\n // context.lineTo(x + width, y + height);\n // } else {\n // context.moveTo(x + width, y + height);\n // }\n // // bottom\n // if (stroke[2]) {\n // context.lineTo(x, y + height);\n // } else {\n // context.moveTo(x, y + height);\n // }\n // // left\n // if (stroke[3]) {\n // // 没有close path是,起点和终点不连续,需要调整y保证不出现缺口\n // const adjustY = stroke[0] ? y - context.lineWidth / 2 : y;\n // context.lineTo(x, adjustY);\n // } else {\n // context.moveTo(x, y);\n // }\n\n // context.stroke();\n\n const {\n width = rectAttribute.width,\n height = rectAttribute.height,\n // 基础border\n stroke = rectAttribute.stroke,\n strokeArrayColor = (rectAttribute as any).strokeArrayColor,\n strokeArrayWidth = (rectAttribute as any).strokeArrayWidth,\n\n lineWidth = rectAttribute.lineWidth,\n strokeColor = rectAttribute.stroke\n // // select & hover border\n // highlightStroke = (rectAttribute as any).highlightStroke,\n // highlightStrokeArrayColor = (rectAttribute as any).highlightStrokeArrayColor,\n // highlightStrokeArrayWidth = (rectAttribute as any).highlightStrokeArrayWidth,\n // highlightStrokeArrayPart = (rectAttribute as any).highlightStrokeArrayPart,\n } = rect.attribute as any;\n\n if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {\n return;\n }\n\n if (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {\n // let dx = 0;\n // let dy = 0;\n let deltaWidth = 0;\n let deltaHeight = 0;\n if (\n // rect.name !== 'border-rect' && // border-rect not need offset\n // rect.name !== 'table-border-rect' && // table-border-rect not need offset\n (typeof lineWidth === 'number' && lineWidth & 1) ||\n (Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => width & 1))\n ) {\n const table = (rect.stage as any).table as BaseTableAPI;\n const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';\n if (bottomRight) {\n x = Math.floor(x) - 0.5;\n y = Math.floor(y) - 0.5;\n deltaWidth = 0.5;\n deltaHeight = 0.5;\n } else {\n x = Math.floor(x) + 0.5;\n y = Math.floor(y) + 0.5;\n }\n }\n renderStroke(\n rect as IGroup,\n context,\n x,\n y,\n rectAttribute,\n stroke,\n strokeArrayWidth || lineWidth,\n strokeArrayColor || strokeColor,\n Math.ceil(width + deltaWidth),\n Math.ceil(height + deltaHeight)\n );\n }\n }\n}\n\n// 判断是否为整数,如果是整数,需要偏移0.5px\nfunction isInteger(num: number) {\n return num % 1 === 0;\n}\n"]}
|
|
@@ -29,34 +29,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
29
29
|
value: !0
|
|
30
30
|
}), exports.createChartCellGroup = void 0;
|
|
31
31
|
|
|
32
|
-
const group_1 = require("../../graphic/group"), chart_1 = require("../../graphic/chart"), registerChartTypes = __importStar(require("../../../chartModule")), get_prop_1 = require("../../utils/get-prop"), vutils_1 = require("@visactor/vutils");
|
|
32
|
+
const group_1 = require("../../graphic/group"), chart_1 = require("../../graphic/chart"), registerChartTypes = __importStar(require("../../../chartModule")), get_prop_1 = require("../../utils/get-prop"), vutils_1 = require("@visactor/vutils"), cell_border_stroke_width_1 = require("../../utils/cell-border-stroke-width");
|
|
33
33
|
|
|
34
34
|
function createChartCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, dataValue, chartModule, chartSpec, chartInstance, dataId, table, cellTheme, isShareChartSpec) {
|
|
35
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
35
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
36
36
|
const ClassType = registerChartTypes.get()[chartModule], headerStyle = table._getCellStyle(col, row), functionalPadding = (0,
|
|
37
37
|
get_prop_1.getFunctionalProp)("padding", headerStyle, col, row, table);
|
|
38
|
-
(0, vutils_1.isValid)(functionalPadding) && (padding = functionalPadding), cellGroup
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
38
|
+
if ((0, vutils_1.isValid)(functionalPadding) && (padding = functionalPadding), !cellGroup) {
|
|
39
|
+
const strokeArrayWidth = (0, cell_border_stroke_width_1.getCellBorderStrokeWidth)(col, row, cellTheme, table);
|
|
40
|
+
(cellGroup = new group_1.Group({
|
|
41
|
+
x: xOrigin,
|
|
42
|
+
y: yOrigin,
|
|
43
|
+
width: width,
|
|
44
|
+
height: height,
|
|
45
|
+
lineWidth: null !== (_b = null === (_a = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _a ? void 0 : _a.lineWidth) && void 0 !== _b ? _b : void 0,
|
|
46
|
+
fill: null !== (_d = null === (_c = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _c ? void 0 : _c.fill) && void 0 !== _d ? _d : void 0,
|
|
47
|
+
stroke: null !== (_f = null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.stroke) && void 0 !== _f ? _f : void 0,
|
|
48
|
+
strokeArrayWidth: strokeArrayWidth,
|
|
49
|
+
strokeArrayColor: null !== (_h = null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.strokeArrayColor) && void 0 !== _h ? _h : void 0,
|
|
50
|
+
cursor: null !== (_k = null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.cursor) && void 0 !== _k ? _k : void 0,
|
|
51
|
+
lineDash: null !== (_m = null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.lineDash) && void 0 !== _m ? _m : void 0,
|
|
52
|
+
lineCap: "square",
|
|
53
|
+
clip: !0,
|
|
54
|
+
cornerRadius: cellTheme.group.cornerRadius
|
|
55
|
+
})).role = "cell", cellGroup.col = col, cellGroup.row = row, null == columnGroup || columnGroup.addCellGroup(cellGroup);
|
|
56
|
+
}
|
|
54
57
|
cellGroup.AABBBounds.width();
|
|
55
58
|
const chartGroup = new chart_1.Chart(isShareChartSpec, {
|
|
56
59
|
stroke: !1,
|
|
57
60
|
x: padding[3],
|
|
58
61
|
y: padding[0],
|
|
59
|
-
canvas: null !== (
|
|
62
|
+
canvas: null !== (_o = table.canvas) && void 0 !== _o ? _o : table.scenegraph.stage.window.getContext().canvas,
|
|
60
63
|
mode: table.options.mode,
|
|
61
64
|
modeParams: table.options.modeParams,
|
|
62
65
|
spec: chartSpec,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/group-creater/cell-type/chart-cell.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA4C;AAC5C,+CAA4C;AAC5C,yEAA2D;AAC3D,mDAAyD;AACzD,6CAA2C;AAG3C,SAAgB,oBAAoB,CAClC,SAAuB,EACvB,WAAkB,EAClB,OAAe,EACf,OAAe,EACf,GAAW,EACX,GAAW,EACX,KAAa,EACb,MAAc,EACd,OAAiB,EACjB,SAAiB,EACjB,WAAgB,EAChB,SAAc,EACd,aAAkB,EAClB,MAAuC,EACvC,KAAmB,EACnB,SAAqB,EACrB,gBAAsB;;IAGtB,MAAM,cAAc,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC;IAChD,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAC;IAC9C,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAClD,MAAM,iBAAiB,GAAG,IAAA,4BAAiB,EAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACrF,IAAI,IAAA,gBAAO,EAAC,iBAAiB,CAAC,EAAE;QAC9B,OAAO,GAAG,iBAAiB,CAAC;KAC7B;IAED,IAAI,CAAC,SAAS,EAAE;QACd,SAAS,GAAG,IAAI,aAAK,CAAC;YACpB,CAAC,EAAE,OAAO;YACV,CAAC,EAAE,OAAO;YACV,KAAK;YACL,MAAM;YAGN,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K;QACb,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACb,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QAEb,MAAM,EAAE,MAAA,KAAK,CAAC,MAAM,mCAAK,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,MAAuC;QAC3G,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI;QACxB,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU;QACpC,IAAI,EAAE,SAAS;QACf,SAAS;QACT,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QACtC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QACxC,aAAa;QACb,MAAM;QACN,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC;QAClC,WAAW,EAAE,OAAO;QACpB,GAAG,EAAE,KAAK,CAAC,aAAa,CAAC,UAAU;QAOnC,IAAI,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;KAOvF,CAAC,CAAC;IACH,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAElC,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAEnF,OAAO,SAAS,CAAC;AACnB,CAAC;AA/FD,oDA+FC","file":"chart-cell.js","sourcesContent":["import { Group } from '../../graphic/group';\nimport { Chart } from '../../graphic/chart';\nimport * as registerChartTypes from '../../../chartModule';\nimport { getFunctionalProp } from '../../utils/get-prop';\nimport { isValid } from '@visactor/vutils';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport type { IThemeSpec } from './../../../vrender';\nimport { getCellBorderStrokeWidth } from '../../utils/cell-border-stroke-width';\nexport function createChartCellGroup(\n cellGroup: Group | null,\n columnGroup: Group,\n xOrigin: number,\n yOrigin: number,\n col: number,\n row: number,\n width: number,\n height: number,\n padding: number[],\n dataValue: string,\n chartModule: any,\n chartSpec: any,\n chartInstance: any,\n dataId: string | Record<string, string>,\n table: BaseTableAPI,\n cellTheme: IThemeSpec,\n isShareChartSpec: true\n) {\n // 获取注册的chart图表类型\n const registerCharts = registerChartTypes.get();\n const ClassType = registerCharts[chartModule];\n const headerStyle = table._getCellStyle(col, row); // to be fixed\n const functionalPadding = getFunctionalProp('padding', headerStyle, col, row, table);\n if (isValid(functionalPadding)) {\n padding = functionalPadding;\n }\n // cell\n if (!cellGroup) {\n const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);\n cellGroup = new Group({\n x: xOrigin,\n y: yOrigin,\n width,\n height,\n\n // 背景相关,cell背景由cellGroup绘制\n lineWidth: cellTheme?.group?.lineWidth ?? undefined,\n fill: cellTheme?.group?.fill ?? undefined,\n stroke: cellTheme?.group?.stroke ?? undefined,\n strokeArrayWidth: strokeArrayWidth,\n strokeArrayColor: (cellTheme?.group as any)?.strokeArrayColor ?? undefined,\n cursor: (cellTheme?.group as any)?.cursor ?? undefined,\n lineDash: cellTheme?.group?.lineDash ?? undefined,\n\n lineCap: 'square',\n\n clip: true,\n\n cornerRadius: cellTheme.group.cornerRadius\n } as any);\n cellGroup.role = 'cell';\n cellGroup.col = col;\n cellGroup.row = row;\n // columnGroup?.addChild(cellGroup);\n columnGroup?.addCellGroup(cellGroup);\n }\n cellGroup.AABBBounds.width(); // TODO 需要底层VRender修改\n // chart\n const chartGroup = new Chart(isShareChartSpec, {\n stroke: false,\n x: padding[3],\n y: padding[0],\n // canvas: table.canvas,\n canvas: table.canvas ?? (table.scenegraph.stage.window.getContext().canvas as unknown as HTMLCanvasElement),\n mode: table.options.mode,\n modeParams: table.options.modeParams,\n spec: chartSpec,\n ClassType,\n width: width - padding[3] - padding[1],\n height: height - padding[2] - padding[0],\n chartInstance,\n dataId,\n data: table.getCellValue(col, row),\n cellPadding: padding,\n dpr: table.internalProps.pixelRatio,\n // viewBox: {\n // x1: Math.ceil(cellGroup.globalAABBBounds.x1 + padding[3] + table.scrollLeft),\n // x2: Math.ceil(cellGroup.globalAABBBounds.x1 + width - padding[1] + table.scrollLeft),\n // y1: Math.ceil(cellGroup.globalAABBBounds.y1 + padding[0] + table.scrollTop),\n // y2: Math.ceil(cellGroup.globalAABBBounds.y1 + height - padding[2] + table.scrollTop)\n // },\n axes: table.isPivotChart() ? table.internalProps.layoutMap.getChartAxes(col, row) : []\n // clipRect: {\n // left: cellGroup.globalAABBBounds.x1 + (table as any).tableX + padding[3],\n // top: cellGroup.globalAABBBounds.y1 + (table as any).tableY + padding[0],\n // width: width - padding[1] - padding[3], //cellGroup.globalAABBBounds.width() - padding[1] - padding[3],\n // height: height - padding[0] - padding[2],\n // },\n });\n cellGroup.appendChild(chartGroup);\n // 将生成的实例存到layoutMap中 共享\n table.internalProps.layoutMap.setChartInstance(col, row, chartGroup.chartInstance);\n\n return cellGroup;\n}\n"]}
|
|
@@ -4,26 +4,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.createCheckboxCellGroup = void 0;
|
|
6
6
|
|
|
7
|
-
const group_1 = require("../../graphic/group"), vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@visactor/vrender-components"), get_hierarchy_offset_1 = require("../../utils/get-hierarchy-offset"), helper_1 = require("../../../tools/helper"), get_prop_1 = require("../../utils/get-prop");
|
|
7
|
+
const group_1 = require("../../graphic/group"), vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@visactor/vrender-components"), get_hierarchy_offset_1 = require("../../utils/get-hierarchy-offset"), helper_1 = require("../../../tools/helper"), get_prop_1 = require("../../utils/get-prop"), cell_border_stroke_width_1 = require("../../utils/cell-border-stroke-width");
|
|
8
8
|
|
|
9
9
|
function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
|
|
10
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
10
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
11
|
+
if (!cellGroup) {
|
|
12
|
+
const strokeArrayWidth = (0, cell_border_stroke_width_1.getCellBorderStrokeWidth)(col, row, cellTheme, table);
|
|
13
|
+
(cellGroup = new group_1.Group({
|
|
14
|
+
x: xOrigin,
|
|
15
|
+
y: yOrigin,
|
|
16
|
+
width: width,
|
|
17
|
+
height: height,
|
|
18
|
+
lineWidth: null !== (_b = null === (_a = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _a ? void 0 : _a.lineWidth) && void 0 !== _b ? _b : void 0,
|
|
19
|
+
fill: null !== (_d = null === (_c = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _c ? void 0 : _c.fill) && void 0 !== _d ? _d : void 0,
|
|
20
|
+
stroke: null !== (_f = null === (_e = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _e ? void 0 : _e.stroke) && void 0 !== _f ? _f : void 0,
|
|
21
|
+
strokeArrayWidth: strokeArrayWidth,
|
|
22
|
+
strokeArrayColor: null !== (_h = null === (_g = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _g ? void 0 : _g.strokeArrayColor) && void 0 !== _h ? _h : void 0,
|
|
23
|
+
cursor: null !== (_k = null === (_j = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _j ? void 0 : _j.cursor) && void 0 !== _k ? _k : void 0,
|
|
24
|
+
lineDash: null !== (_m = null === (_l = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _l ? void 0 : _l.lineDash) && void 0 !== _m ? _m : void 0,
|
|
25
|
+
lineCap: "square",
|
|
26
|
+
clip: !0,
|
|
27
|
+
cornerRadius: cellTheme.group.cornerRadius
|
|
28
|
+
})).role = "cell", cellGroup.col = col, cellGroup.row = row, null == columnGroup || columnGroup.addCellGroup(cellGroup);
|
|
29
|
+
}
|
|
27
30
|
const checkboxComponent = createCheckbox(col, row, colWidth, width, height, padding, cellTheme, define, table);
|
|
28
31
|
return checkboxComponent && cellGroup.appendChild(checkboxComponent), checkboxComponent.render(),
|
|
29
32
|
width -= padding[1] + padding[3], height -= padding[0] + padding[2], "center" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + (width - checkboxComponent.AABBBounds.width()) / 2) : "right" === textAlign ? checkboxComponent.setAttribute("x", padding[3] + width - checkboxComponent.AABBBounds.width()) : checkboxComponent.setAttribute("x", padding[3]),
|