@visactor/vtable 0.17.0 → 0.17.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/ListTable.d.ts +1 -0
- package/cjs/ListTable.js +12 -1
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +17 -0
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +17 -0
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +1 -0
- package/cjs/core/BaseTable.js +24 -30
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.d.ts +1 -1
- package/cjs/core/tableHelper.js +6 -5
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/dataset/dataset.js +3 -8
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/edit/edit-manager.js +0 -3
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/event/EventHandler.d.ts +1 -0
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/event.d.ts +10 -0
- package/cjs/event/event.js +2 -1
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/container-dom.js +30 -4
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +19 -5
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +33 -28
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +10 -10
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +9 -9
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/cell-content.d.ts +2 -3
- package/cjs/scenegraph/component/cell-content.js +3 -3
- package/cjs/scenegraph/component/cell-content.js.map +1 -1
- package/cjs/scenegraph/component/custom.js +10 -10
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.d.ts +2 -2
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/text.d.ts +1 -1
- package/cjs/scenegraph/graphic/text.js +1 -1
- package/cjs/scenegraph/graphic/text.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +2 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/icon/icon-update.d.ts +2 -0
- package/cjs/scenegraph/icon/icon-update.js +16 -2
- package/cjs/scenegraph/icon/icon-update.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +8 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-col.js +6 -5
- package/cjs/scenegraph/layout/update-col.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +6 -5
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +2 -0
- package/cjs/scenegraph/scenegraph.js +23 -37
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/utils/text-icon-layout.js +13 -10
- package/cjs/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/cjs/scenegraph/utils/text-pos.js.map +1 -1
- package/cjs/state/select/update-position.js +65 -65
- package/cjs/state/select/update-position.js.map +1 -1
- package/cjs/state/spark-line/index.js +9 -5
- package/cjs/state/spark-line/index.js.map +1 -1
- package/cjs/state/state.js +2 -4
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DARK.js +1 -1
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/component.d.ts +27 -0
- package/cjs/themes/component.js +29 -2
- package/cjs/themes/component.js.map +1 -1
- package/cjs/themes/theme.d.ts +2 -0
- package/cjs/themes/theme.js +9 -1
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/NumberMap.d.ts +4 -0
- package/cjs/tools/NumberMap.js +16 -0
- package/cjs/tools/NumberMap.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +2 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/customElement.d.ts +1 -1
- package/cjs/ts-types/customElement.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +2 -0
- package/cjs/ts-types/theme.js.map +1 -1
- package/dist/vtable.js +10490 -12427
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +11 -1
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +17 -0
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +17 -0
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +1 -0
- package/es/core/BaseTable.js +26 -33
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.d.ts +1 -1
- package/es/core/tableHelper.js +6 -5
- package/es/core/tableHelper.js.map +1 -1
- package/es/dataset/dataset.js +3 -8
- package/es/dataset/dataset.js.map +1 -1
- package/es/edit/edit-manager.js +0 -3
- package/es/edit/edit-manager.js.map +1 -1
- package/es/event/EventHandler.d.ts +1 -0
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/event.d.ts +10 -0
- package/es/event/event.js +2 -1
- package/es/event/event.js.map +1 -1
- package/es/event/listener/container-dom.js +30 -4
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +20 -4
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +33 -28
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +10 -10
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +9 -9
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/cell-content.d.ts +2 -3
- package/es/scenegraph/component/cell-content.js +3 -5
- package/es/scenegraph/component/cell-content.js.map +1 -1
- package/es/scenegraph/component/custom.js +10 -12
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.d.ts +2 -2
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/text.d.ts +1 -1
- package/es/scenegraph/graphic/text.js +1 -1
- package/es/scenegraph/graphic/text.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +3 -2
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +2 -2
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/icon/icon-update.d.ts +2 -0
- package/es/scenegraph/icon/icon-update.js +13 -0
- package/es/scenegraph/icon/icon-update.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +9 -6
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/update-col.js +6 -5
- package/es/scenegraph/layout/update-col.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +6 -5
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +2 -0
- package/es/scenegraph/scenegraph.js +24 -38
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/utils/text-icon-layout.js +13 -12
- package/es/scenegraph/utils/text-icon-layout.js.map +1 -1
- package/es/scenegraph/utils/text-pos.js.map +1 -1
- package/es/state/select/update-position.js +65 -65
- package/es/state/select/update-position.js.map +1 -1
- package/es/state/spark-line/index.js +9 -5
- package/es/state/spark-line/index.js.map +1 -1
- package/es/state/state.js +2 -4
- package/es/state/state.js.map +1 -1
- package/es/themes/DARK.js +1 -1
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/component.d.ts +27 -0
- package/es/themes/component.js +28 -0
- package/es/themes/component.js.map +1 -1
- package/es/themes/theme.d.ts +2 -0
- package/es/themes/theme.js +9 -2
- package/es/themes/theme.js.map +1 -1
- package/es/tools/NumberMap.d.ts +4 -0
- package/es/tools/NumberMap.js +16 -0
- package/es/tools/NumberMap.js.map +1 -1
- package/es/ts-types/base-table.d.ts +2 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/customElement.d.ts +1 -1
- package/es/ts-types/customElement.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/ts-types/theme.d.ts +2 -0
- package/es/ts-types/theme.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/component/custom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,m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createCircle, createLine, createRect, Group as VGroup } from '@visactor/vrender';\nimport { isFunction, isObject, isString, isValid } from '@visactor/vutils';\nimport type {\n ICustomLayout,\n ICustomRender,\n ICustomRenderElement,\n ICustomRenderElements,\n RectElement\n} from '../../ts-types';\nimport { Group } from '../graphic/group';\nimport { Icon } from '../graphic/icon';\nimport { WrapText } from '../graphic/text';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { percentCalcObj, Rect } from '../../render/layout';\n\nexport function dealWithCustom(\n customLayout: ICustomLayout,\n customRender: ICustomRender,\n col: number,\n row: number,\n width: number,\n height: number,\n autoWidth: boolean,\n autoHeight: boolean,\n padding: [number, number, number, number],\n table: BaseTableAPI\n) {\n let renderDefault = true;\n let enableCellPadding = false;\n let expectedWidth: number;\n let expectedHeight: number;\n let customElements;\n let elementsGroup: VGroup;\n\n if (typeof customLayout === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customLayout(arg);\n if (customRenderObj.rootContainer) {\n customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);\n }\n // expectedWidth = customRenderObj.expectedWidth;\n // expectedHeight = customRenderObj.expectedHeight;\n if (customRenderObj.rootContainer instanceof VGroup) {\n elementsGroup = customRenderObj.rootContainer;\n elementsGroup.name = 'custom-container';\n // } else if (customRenderObj.rootContainer) {\n // customElements = customRenderObj.rootContainer.getElements(undefined, false, false);\n }\n renderDefault = customRenderObj.renderDefault;\n enableCellPadding = customRenderObj.enableCellPadding;\n } else if (typeof customRender === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customRender(arg);\n if (customRenderObj) {\n customElements = customRenderObj.elements;\n renderDefault = customRenderObj.renderDefault;\n expectedWidth = customRenderObj.expectedWidth;\n expectedHeight = customRenderObj.expectedHeight;\n }\n } else if (customRender) {\n expectedWidth = customRender.expectedWidth;\n expectedHeight = customRender.expectedHeight;\n customElements = customRender.elements;\n renderDefault = customRender.renderDefault;\n }\n\n if (customElements) {\n const value = table.getCellValue(col, row);\n elementsGroup = adjustElementToGroup(\n customElements,\n autoWidth ? expectedWidth : width,\n autoHeight ? expectedHeight : height,\n value\n );\n }\n\n if (enableCellPadding) {\n elementsGroup.setAttributes({\n x: padding[3],\n y: padding[0],\n width: width - padding[1] - padding[3],\n height: height - padding[0] - padding[2]\n });\n }\n\n // for percent calc\n dealPercentCalc(elementsGroup, width, height);\n\n return {\n elementsGroup,\n renderDefault\n };\n}\n\nfunction adjustElementToGroup(\n elements: ICustomRenderElements,\n width: number,\n height: number,\n value: any\n): VGroup | undefined {\n const customGroup = new VGroup({\n x: 0,\n y: 0,\n width,\n height,\n fill: false,\n stroke: false,\n pickable: false\n });\n customGroup.name = 'custom-container';\n\n const elementsAdjusted = adjustElementsPos(elements, width, height, value);\n elementsAdjusted.forEach(element => {\n switch (element.type) {\n case 'arc':\n const arc = createArc({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n outerRadius: element.radius as number,\n startAngle: element.startAngle as number,\n endAngle: element.endAngle as number,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(arc);\n break;\n case 'text':\n if (element.background) {\n const expandX = element.background?.expandX ?? 0;\n const expandY = element.background?.expandY ?? 0;\n const textBackRect = createRect({\n x: (element.x as number) - expandX,\n y: (element.y as number) - expandY,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width + expandX * 2,\n height: element.height + expandY * 2,\n cornerRadius: element.background?.cornerRadius ?? 0,\n // fill: true,\n fill: element.background?.fill ?? '#888'\n });\n customGroup.appendChild(textBackRect);\n }\n const text = new WrapText(\n Object.assign(\n {\n pickable: !!element.clickable,\n fill: element.color ?? element.fill\n },\n element as any\n )\n );\n customGroup.appendChild(text);\n break;\n case 'rect':\n const rect = createRect({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n cornerRadius: element.radius as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(rect);\n break;\n case 'circle':\n const circle = createCircle({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n radius: element.radius as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(circle);\n break;\n case 'icon':\n const icon = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.svg as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n icon.role = 'icon-custom';\n customGroup.appendChild(icon);\n break;\n case 'image':\n const image = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.src as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor,\n shape: element.shape\n });\n image.role = 'image-custom';\n customGroup.appendChild(image);\n break;\n\n case 'line':\n const line = createLine({\n points: element.points,\n stroke: element.stroke as string,\n pickable: !!element.clickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(line);\n break;\n }\n });\n\n return customGroup;\n}\n\nfunction adjustElementsPos(\n originalElements: ICustomRenderElements,\n // rect: RectProps,\n width: number,\n height: number,\n // borderLineWidths: number[],\n value: any\n): ICustomRenderElements {\n const result: ICustomRenderElements = [];\n // const { left, top, width, height } = rect;\n const left = 0;\n const top = 0;\n const borderLineWidths = [0, 0, 0, 0];\n\n for (let i = 0; i < originalElements.length; i++) {\n const originalElement = originalElements[i];\n const element = Object.assign({}, originalElement);\n // 执行相关函数\n for (const name in element) {\n if (element.hasOwnProperty(name) && isFunction(element[name])) {\n element[name] = (element[name] as Function)(value);\n }\n }\n\n // 转换字符串值(百分比、px)\n const rect = element as RectElement;\n if (isValid(rect.x)) {\n rect.x = isString(rect.x)\n ? transformString((rect as any).x as string, width - borderLineWidths[1])\n : Number(rect.x);\n }\n if (isValid(rect.y)) {\n rect.y = isString(rect.y)\n ? transformString((rect as any).y as string, height - borderLineWidths[2])\n : Number(rect.y);\n }\n if ('width' in element) {\n element.width = isString(element.width)\n ? transformString(element.width as string, width - borderLineWidths[1])\n : Number(element.width);\n }\n if ('height' in element) {\n element.height = isString(element.height)\n ? transformString(element.height as string, height - borderLineWidths[2])\n : Number(element.height);\n }\n if ('radius' in element) {\n element.radius = isString(element.radius)\n ? transformString(element.radius as string, Math.min(width - borderLineWidths[1], height - borderLineWidths[2]))\n : Number(element.radius);\n }\n if ('hover' in element) {\n // 转换字符串值(百分比、px)\n element.hover.x = isString(element.hover.x)\n ? transformString(element.hover.x as string, width - borderLineWidths[1])\n : Number(element.hover.x);\n element.hover.y = isString(element.hover.y)\n ? transformString(element.hover.y as string, height - borderLineWidths[2])\n : Number(element.hover.y);\n element.hover.width = isString(element.hover.width)\n ? transformString(element.hover.width as string, width - borderLineWidths[1])\n : Number(element.hover.width);\n\n element.hover.height = isString(element.hover.height)\n ? transformString(element.hover.height as string, height - borderLineWidths[2])\n : Number(element.hover.height);\n element.hover.x += left;\n element.hover.y += top;\n }\n // 矫正位置\n rect.x = rect.x + left;\n rect.y = rect.y + top;\n\n result.push(element as unknown as ICustomRenderElement);\n }\n\n return result;\n}\n\nfunction transformString(str: string, size?: number): number {\n if (str.endsWith('px')) {\n return parseInt(str, 10);\n } else if (str.endsWith('%') && size) {\n return (parseInt(str, 10) / 100) * size;\n }\n return parseInt(str, 10);\n}\n\nexport function dealPercentCalc(group: VGroup, parentWidth: number, parentHeight: number) {\n if (!group) {\n return;\n }\n group.forEachChildren((child: VGroup) => {\n if (isObject(child.attribute.width) && (child.attribute.width as percentCalcObj).percent) {\n child.setAttribute(\n 'width',\n ((child.attribute.width as percentCalcObj).percent / 100) * parentWidth +\n ((child.attribute.width as percentCalcObj).delta ?? 0)\n );\n }\n\n if (isObject(child.attribute.height) && (child.attribute.height as percentCalcObj).percent) {\n child.setAttribute(\n 'height',\n ((child.attribute.height as percentCalcObj).percent / 100) * parentHeight +\n ((child.attribute.height as percentCalcObj).delta ?? 0)\n );\n }\n\n if (child.type === 'group') {\n dealPercentCalc(child, child.attribute.width, child.attribute.height);\n }\n });\n}\n\n// temp devode for react jsx customLayout\nexport function decodeReactDom(dom: any) {\n if (!dom.$$typeof) {\n // not react\n return dom;\n }\n const type = dom.type;\n const { attribute, children } = dom.props;\n const g = type({ attribute });\n g.id = attribute.id;\n g.name = attribute.name;\n children &&\n children.length &&\n children.forEach((item: any) => {\n const c = decodeReactDom(item);\n g.add(c);\n });\n return g;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/component/custom.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAA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or } from '@visactor/vrender';\nimport { createArc, createCircle, createLine, createRect, Text, Group as VGroup } from '@visactor/vrender';\nimport { isFunction, isObject, isString, isValid } from '@visactor/vutils';\nimport type {\n ICustomLayout,\n ICustomRender,\n ICustomRenderElement,\n ICustomRenderElements,\n RectElement\n} from '../../ts-types';\nimport { Icon } from '../graphic/icon';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { percentCalcObj } from '../../render/layout';\n\nexport function dealWithCustom(\n customLayout: ICustomLayout,\n customRender: ICustomRender,\n col: number,\n row: number,\n width: number,\n height: number,\n autoWidth: boolean,\n autoHeight: boolean,\n padding: [number, number, number, number],\n table: BaseTableAPI\n) {\n let renderDefault = true;\n let enableCellPadding = false;\n let expectedWidth: number;\n let expectedHeight: number;\n let customElements;\n let elementsGroup: VGroup;\n\n if (typeof customLayout === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customLayout(arg);\n if (customRenderObj.rootContainer) {\n customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);\n }\n // expectedWidth = customRenderObj.expectedWidth;\n // expectedHeight = customRenderObj.expectedHeight;\n if (customRenderObj.rootContainer instanceof VGroup) {\n elementsGroup = customRenderObj.rootContainer;\n elementsGroup.name = 'custom-container';\n // } else if (customRenderObj.rootContainer) {\n // customElements = customRenderObj.rootContainer.getElements(undefined, false, false);\n }\n renderDefault = customRenderObj.renderDefault;\n enableCellPadding = customRenderObj.enableCellPadding;\n } else if (typeof customRender === 'function') {\n const arg = {\n col,\n row,\n dataValue: table.getCellOriginValue(col, row),\n value: table.getCellValue(col, row) || '',\n rect: {\n left: 0,\n top: 0,\n right: width,\n bottom: height,\n width,\n height\n },\n table\n };\n const customRenderObj = customRender(arg);\n if (customRenderObj) {\n customElements = customRenderObj.elements;\n renderDefault = customRenderObj.renderDefault;\n expectedWidth = customRenderObj.expectedWidth;\n expectedHeight = customRenderObj.expectedHeight;\n }\n } else if (customRender) {\n expectedWidth = customRender.expectedWidth;\n expectedHeight = customRender.expectedHeight;\n customElements = customRender.elements;\n renderDefault = customRender.renderDefault;\n }\n\n if (customElements) {\n const value = table.getCellValue(col, row);\n elementsGroup = adjustElementToGroup(\n customElements,\n autoWidth ? expectedWidth : width,\n autoHeight ? expectedHeight : height,\n value\n );\n }\n\n if (enableCellPadding) {\n elementsGroup.setAttributes({\n x: padding[3],\n y: padding[0],\n width: width - padding[1] - padding[3],\n height: height - padding[0] - padding[2]\n });\n }\n\n // for percent calc\n dealPercentCalc(elementsGroup, width, height);\n\n return {\n elementsGroup,\n renderDefault\n };\n}\n\nfunction adjustElementToGroup(\n elements: ICustomRenderElements,\n width: number,\n height: number,\n value: any\n): VGroup | undefined {\n const customGroup = new VGroup({\n x: 0,\n y: 0,\n width,\n height,\n fill: false,\n stroke: false,\n pickable: false\n });\n customGroup.name = 'custom-container';\n\n const elementsAdjusted = adjustElementsPos(elements, width, height, value);\n elementsAdjusted.forEach(element => {\n if ((element as any).clickable) {\n element.pickable = (element as any).clickable;\n }\n switch (element.type) {\n case 'arc':\n const arc = createArc({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n outerRadius: element.radius as number,\n startAngle: element.startAngle as number,\n endAngle: element.endAngle as number,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(arc);\n break;\n case 'text':\n if (element.background) {\n const expandX = element.background?.expandX ?? 0;\n const expandY = element.background?.expandY ?? 0;\n const textBackRect = createRect({\n x: (element.x as number) - expandX,\n y: (element.y as number) - expandY,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width + expandX * 2,\n height: element.height + expandY * 2,\n cornerRadius: element.background?.cornerRadius ?? 0,\n // fill: true,\n fill: element.background?.fill ?? '#888'\n });\n customGroup.appendChild(textBackRect);\n }\n const text = new Text(\n Object.assign(\n {\n pickable: !!element.pickable,\n fill: element.color ?? element.fill\n },\n element as any\n )\n );\n customGroup.appendChild(text);\n break;\n case 'rect':\n const rect = createRect({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n cornerRadius: element.radius as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(rect);\n break;\n case 'circle':\n const circle = createCircle({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n radius: element.radius as number,\n fill: element.fill as string,\n stroke: element.stroke as string,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(circle);\n break;\n case 'icon':\n const icon = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.svg as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor\n });\n icon.role = 'icon-custom';\n customGroup.appendChild(icon);\n break;\n case 'image':\n const image = new Icon({\n x: element.x as number,\n y: element.y as number,\n dx: (element.dx ?? 0) as number,\n dy: (element.dy ?? 0) as number,\n width: element.width as number,\n height: element.height as number,\n image: element.src as string,\n backgroundWidth: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundHeight: element.hover ? ((element.hover.width ?? element.width) as number) : undefined,\n backgroundColor: element.hover ? element.hover.bgColor ?? 'rgba(22,44,66,0.2)' : undefined,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor,\n shape: element.shape\n });\n image.role = 'image-custom';\n customGroup.appendChild(image);\n break;\n\n case 'line':\n const line = createLine({\n points: element.points,\n stroke: element.stroke as string,\n pickable: !!element.pickable,\n cursor: element.cursor as Cursor\n });\n customGroup.appendChild(line);\n break;\n }\n });\n\n return customGroup;\n}\n\nfunction adjustElementsPos(\n originalElements: ICustomRenderElements,\n // rect: RectProps,\n width: number,\n height: number,\n // borderLineWidths: number[],\n value: any\n): ICustomRenderElements {\n const result: ICustomRenderElements = [];\n // const { left, top, width, height } = rect;\n const left = 0;\n const top = 0;\n const borderLineWidths = [0, 0, 0, 0];\n\n for (let i = 0; i < originalElements.length; i++) {\n const originalElement = originalElements[i];\n const element = Object.assign({}, originalElement);\n // 执行相关函数\n for (const name in element) {\n if (element.hasOwnProperty(name) && isFunction(element[name])) {\n element[name] = (element[name] as Function)(value);\n }\n }\n\n // 转换字符串值(百分比、px)\n const rect = element as RectElement;\n if (isValid(rect.x)) {\n rect.x = isString(rect.x)\n ? transformString((rect as any).x as string, width - borderLineWidths[1])\n : Number(rect.x);\n }\n if (isValid(rect.y)) {\n rect.y = isString(rect.y)\n ? transformString((rect as any).y as string, height - borderLineWidths[2])\n : Number(rect.y);\n }\n if ('width' in element) {\n element.width = isString(element.width)\n ? transformString(element.width as string, width - borderLineWidths[1])\n : Number(element.width);\n }\n if ('height' in element) {\n element.height = isString(element.height)\n ? transformString(element.height as string, height - borderLineWidths[2])\n : Number(element.height);\n }\n if ('radius' in element) {\n element.radius = isString(element.radius)\n ? transformString(element.radius as string, Math.min(width - borderLineWidths[1], height - borderLineWidths[2]))\n : Number(element.radius);\n }\n if ('hover' in element) {\n // 转换字符串值(百分比、px)\n element.hover.x = isString(element.hover.x)\n ? transformString(element.hover.x as string, width - borderLineWidths[1])\n : Number(element.hover.x);\n element.hover.y = isString(element.hover.y)\n ? transformString(element.hover.y as string, height - borderLineWidths[2])\n : Number(element.hover.y);\n element.hover.width = isString(element.hover.width)\n ? transformString(element.hover.width as string, width - borderLineWidths[1])\n : Number(element.hover.width);\n\n element.hover.height = isString(element.hover.height)\n ? transformString(element.hover.height as string, height - borderLineWidths[2])\n : Number(element.hover.height);\n element.hover.x += left;\n element.hover.y += top;\n }\n // 矫正位置\n rect.x = rect.x + left;\n rect.y = rect.y + top;\n\n result.push(element as unknown as ICustomRenderElement);\n }\n\n return result;\n}\n\nfunction transformString(str: string, size?: number): number {\n if (str.endsWith('px')) {\n return parseInt(str, 10);\n } else if (str.endsWith('%') && size) {\n return (parseInt(str, 10) / 100) * size;\n }\n return parseInt(str, 10);\n}\n\nexport function dealPercentCalc(group: VGroup, parentWidth: number, parentHeight: number) {\n if (!group) {\n return;\n }\n group.forEachChildren((child: VGroup) => {\n if (isObject(child.attribute.width) && (child.attribute.width as percentCalcObj).percent) {\n child.setAttribute(\n 'width',\n ((child.attribute.width as percentCalcObj).percent / 100) * parentWidth +\n ((child.attribute.width as percentCalcObj).delta ?? 0)\n );\n }\n\n if (isObject(child.attribute.height) && (child.attribute.height as percentCalcObj).percent) {\n child.setAttribute(\n 'height',\n ((child.attribute.height as percentCalcObj).percent / 100) * parentHeight +\n ((child.attribute.height as percentCalcObj).delta ?? 0)\n );\n }\n\n if (child.type === 'group') {\n dealPercentCalc(child, child.attribute.width, child.attribute.height);\n }\n });\n}\n\n// temp devode for react jsx customLayout\nexport function decodeReactDom(dom: any) {\n if (!dom.$$typeof) {\n // not react\n return dom;\n }\n const type = dom.type;\n const { attribute, children } = dom.props;\n const g = type({ attribute });\n g.id = attribute.id;\n g.name = attribute.name;\n children &&\n children.length &&\n children.forEach((item: any) => {\n const c = decodeReactDom(item);\n g.add(c);\n });\n return g;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/component/table-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAClG,OA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CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,QAAQ,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;IACD,4BAA4B,CAAC,SAAiB;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup } from '@visactor/vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from '@visactor/vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport type { WrapText } from '../graphic/text';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizeLine: ILine; // 表格列宽调整基准线\n columnResizeBgLine: ILine; // 表格列宽调整基准线背景\n columnResizeLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // 列宽调整基准线\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n this.columnResizeLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizeBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizeBgWidth - columnResizeWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizeLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: 10,\n fill: '#FFF',\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -8 + 2\n });\n const columnResizeLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: '#3073F2',\n x: 0,\n y: 0,\n width: 38,\n height: 16,\n cornerRadius: 5,\n dx: 12,\n dy: -8\n });\n this.columnResizeLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizeLabel.appendChild(columnResizeLabelBack);\n this.columnResizeLabel.appendChild(columnResizeLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizeBgLine);\n componentGroup.addChild(this.columnResizeLine);\n componentGroup.addChild(this.columnResizeLabel);\n if (this.table.theme.scrollStyle.hoverOn) {\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n } else {\n componentGroup.stage.defaultLayer.addChild(this.hScrollBar);\n componentGroup.stage.defaultLayer.addChild(this.vScrollBar);\n }\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();\n const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n this.hScrollBar.setAttributes({\n x: frozenColsWidth + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0),\n y: y - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y),\n width: tableWidth - frozenColsWidth - rightFrozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n } else {\n this.hScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: 0,\n visible: false\n });\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n this.vScrollBar.setAttributes({\n x: x - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x),\n y:\n frozenRowsHeight + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.y : 0),\n height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n } else {\n this.vScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n height: 0,\n visible: false\n });\n }\n\n this.table.stateManager.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManager.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizeLine.attribute.visible = false;\n this.columnResizeLine.setAttribute('visible', false);\n this.columnResizeBgLine.setAttribute('visible', false);\n this.columnResizeLabel.setAttribute('visible', false);\n this.columnResizeLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // this.columnResizeLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n this.columnResizeLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizeBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizeLabel.setAttribute('visible', true);\n this.columnResizeLabel.showAll();\n this.columnResizeLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as WrapText).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n // this.columnResizeLine.setAttribute('x', x);\n this.columnResizeLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizeBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizeLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as WrapText).setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number, isRightFrozen?: boolean) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n // const colX = this.table.getColsWidth(0, col);\n const colX = getColX(col, this.table, isRightFrozen);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.getRowsHeight(0, this.table.rowCount - 1)\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = leftRatio * (1 - size);\n this.hScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/component/table-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAgB,MAAM,mBAAmB,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AA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,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;IACD,4BAA4B,CAAC,SAAiB;QAC5C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC;QAC7E,IAAI,CAAC,UAAkB,CAAC,aAAa,GAAG;YACvC,CAAC,EAAE,MAAM,CAAC,EAAE;YACZ,CAAC,EAAE,MAAM,CAAC,EAAE;SACb,CAAC;IACJ,CAAC;CACF","file":"table-component.js","sourcesContent":["import type { ILine, IRect, IGroup, FederatedPointerEvent, Text } from '@visactor/vrender';\nimport { createRect, createLine, createText, createGroup, createSymbol } from '@visactor/vrender';\nimport { ScrollBar } from '@visactor/vrender-components';\nimport type { Group } from '../graphic/group';\nimport { MenuHandler } from './menu';\nimport { DrillIcon } from './drill-icon';\nimport { CellMover } from './cell-mover';\nimport { getColX } from './util';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport type { SceneEvent } from '../../event/util';\nimport { getCellEventArgsSet } from '../../event/util';\nimport type { ListTableAPI } from '../../ts-types';\n\n/**\n * @description: 表格内容外组件\n * @return {*}\n */\nexport class TableComponent {\n table: BaseTableAPI;\n\n border: IRect; // 表格外边框\n // selectBorder: IRect; // 表格选择区域边框\n columnResizeLine: ILine; // 表格列宽调整基准线\n columnResizeBgLine: ILine; // 表格列宽调整基准线背景\n columnResizeLabel: IGroup; // 表格列宽调整标记\n menu: MenuHandler; // 表格菜单\n vScrollBar: ScrollBar; // 表格横向滚动条\n hScrollBar: ScrollBar; // 表格纵向滚动条\n frozenShadowLine: IRect; // 表格冻结列右侧阴影块\n drillIcon: DrillIcon; // drill icon\n cellMover: CellMover; // 表格列顺序调整标记\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n const theme = this.table.theme;\n\n // 滚动条\n this.createScrollBar();\n\n // 列宽调整基准线\n const columnResizeColor = theme.columnResize?.lineColor;\n const columnResizeWidth = theme.columnResize?.lineWidth;\n const columnResizeBgColor = theme.columnResize?.bgColor;\n const columnResizeBgWidth = theme.columnResize?.width;\n this.columnResizeLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeColor as string,\n lineWidth: columnResizeWidth as number,\n x: 0,\n y: 0,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n this.columnResizeBgLine = createLine({\n visible: false,\n pickable: false,\n stroke: columnResizeBgColor as string,\n lineWidth: columnResizeBgWidth as number,\n x: 0,\n y: 0,\n // dx: -(columnResizeBgWidth - columnResizeWidth) / 2,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: 0 }\n ]\n });\n\n // 列宽调整文字标签\n const columnResizeLabelText = createText({\n visible: false,\n pickable: false,\n x: 0,\n y: 0,\n fontSize: 10,\n fill: '#FFF',\n text: '',\n textBaseline: 'top',\n dx: 12 + 4,\n dy: -8 + 2\n });\n const columnResizeLabelBack = createRect({\n visible: false,\n pickable: false,\n fill: '#3073F2',\n x: 0,\n y: 0,\n width: 38,\n height: 16,\n cornerRadius: 5,\n dx: 12,\n dy: -8\n });\n this.columnResizeLabel = createGroup({\n visible: false,\n pickable: false,\n x: 0,\n y: 0\n });\n this.columnResizeLabel.appendChild(columnResizeLabelBack);\n this.columnResizeLabel.appendChild(columnResizeLabelText);\n\n // 列顺序调整基准线\n this.cellMover = new CellMover(this.table);\n\n // 冻结列阴影\n const shadowWidth = theme.frozenColumnLine?.shadow?.width;\n const shadowStartColor = theme.frozenColumnLine?.shadow?.startColor;\n const shadowEndColor = theme.frozenColumnLine?.shadow?.endColor;\n this.frozenShadowLine = createRect({\n visible: true,\n pickable: false,\n x: 0,\n y: 0,\n width: shadowWidth,\n height: 0,\n fill: {\n gradient: 'linear',\n x0: 0,\n y0: 0,\n x1: 1,\n y1: 0,\n stops: [\n { color: shadowStartColor, offset: 0 },\n { color: shadowEndColor, offset: 1 }\n ]\n }\n });\n\n // TO BE DONE 冻结列border(theme.frozenColumnLine?.border)\n\n // 弹出窗口\n // this.menu = createGroup({\n // visible: false,\n // pickable: false,\n // x: 0,\n // y: 0,\n // });\n this.menu = new MenuHandler(this.table);\n\n this.drillIcon = new DrillIcon();\n }\n\n /**\n * @description: 组件mark加入到容器Group中\n * @param {Group} componentGroup\n * @return {*}\n */\n addToGroup(componentGroup: Group) {\n componentGroup.addChild(this.frozenShadowLine);\n // componentGroup.addChild(this.selectBorder);\n componentGroup.addChild(this.columnResizeBgLine);\n componentGroup.addChild(this.columnResizeLine);\n componentGroup.addChild(this.columnResizeLabel);\n if (this.table.theme.scrollStyle.hoverOn) {\n componentGroup.addChild(this.hScrollBar);\n componentGroup.addChild(this.vScrollBar);\n } else {\n componentGroup.stage.defaultLayer.addChild(this.hScrollBar);\n componentGroup.stage.defaultLayer.addChild(this.vScrollBar);\n }\n this.menu.bindTableComponent(componentGroup);\n this.drillIcon.appand(componentGroup);\n this.cellMover.appand(componentGroup);\n }\n\n /**\n * @description: 创建滚动条组件\n * @return {*}\n */\n createScrollBar() {\n const theme = this.table.theme;\n const scrollRailColor = theme.scrollStyle?.scrollRailColor as string;\n const scrollSliderColor = theme.scrollStyle?.scrollSliderColor as string;\n const width = theme.scrollStyle?.width as number;\n // const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n\n this.hScrollBar = new ScrollBar({\n direction: 'horizontal',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: this.table.tableNoFrameWidth,\n height: width,\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n // scrollRange: [0.4, 0.8]\n visible: false\n });\n // hack方案实现初始化隐藏滚动条,也可以add到stage之后执行hideAll\n (this.hScrollBar as any).render();\n this.hScrollBar.hideAll();\n\n this.vScrollBar = new ScrollBar({\n direction: 'vertical',\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width,\n height: this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight(),\n padding: 0,\n railStyle: {\n fill: scrollRailColor\n },\n sliderStyle: {\n fill: scrollSliderColor\n },\n range: [0, 0.1],\n visible: false\n });\n (this.vScrollBar as any).render();\n this.vScrollBar.hideAll();\n }\n\n /**\n * @description: 更新滚动条尺寸\n * @return {*}\n */\n updateScrollBar() {\n const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;\n const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;\n\n const theme = this.table.theme;\n const width = theme.scrollStyle?.width as number;\n const visible = theme.scrollStyle?.visible as string;\n // const hoverOn = theme.scrollStyle?.hoverOn as boolean;\n const tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width);\n const tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height);\n\n const totalHeight = this.table.getAllRowsHeight();\n const totalWidth = this.table.getAllColsWidth();\n const frozenRowsHeight = this.table.getFrozenRowsHeight();\n const frozenColsWidth = this.table.getFrozenColsWidth();\n const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();\n const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();\n if (totalWidth > tableWidth) {\n const y = Math.min(tableHeight, totalHeight);\n const rangeEnd = Math.max(0.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));\n this.hScrollBar.setAttributes({\n x: frozenColsWidth + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0),\n y: y - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y),\n width: tableWidth - frozenColsWidth - rightFrozenColsWidth,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n if (visible === 'always') {\n this.hScrollBar.showAll();\n }\n } else {\n this.hScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n width: 0,\n visible: false\n });\n }\n\n if (totalHeight > tableHeight) {\n const x = Math.min(tableWidth, totalWidth);\n const rangeEnd = Math.max(0.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));\n this.vScrollBar.setAttributes({\n x: x - (this.table.theme.scrollStyle.hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x),\n y:\n frozenRowsHeight + (!this.table.theme.scrollStyle.hoverOn ? this.table.scenegraph.tableGroup.attribute.y : 0),\n height: tableHeight - frozenRowsHeight - bottomFrozenRowsHeight,\n range: [0, rangeEnd],\n visible: visible === 'always'\n });\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n\n if (visible === 'always') {\n this.vScrollBar.showAll();\n }\n } else {\n this.vScrollBar.setAttributes({\n x: -this.table.tableNoFrameWidth * 2,\n y: -this.table.tableNoFrameHeight * 2,\n height: 0,\n visible: false\n });\n }\n\n this.table.stateManager.setScrollLeft(oldHorizontalBarPos);\n this.table.stateManager.setScrollTop(oldVerticalBarPos);\n }\n\n /**\n * @description: 隐藏列宽调整组件\n * @return {*}\n */\n hideResizeCol() {\n // this.columnResizeLine.attribute.visible = false;\n this.columnResizeLine.setAttribute('visible', false);\n this.columnResizeBgLine.setAttribute('visible', false);\n this.columnResizeLabel.setAttribute('visible', false);\n this.columnResizeLabel.hideAll();\n }\n\n /**\n * @description: 显示列宽调整组件\n * @param {number} col\n * @param {number} y\n * @return {*}\n */\n showResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // this.columnResizeLine.attribute.visible = false;\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n this.columnResizeLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n this.columnResizeBgLine.setAttributes({\n visible: true,\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) }\n ]\n });\n\n // 标签\n // this.columnResizeLabel.setAttribute('visible', true);\n this.columnResizeLabel.showAll();\n this.columnResizeLabel.setAttributes({\n visible: true,\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${this.table.getColWidth(col)}px`);\n }\n\n /**\n * @description: 更新列宽调整组件\n * @param {number} col\n * @param {number} y 标签显示的y坐标\n * @return {*}\n */\n updateResizeCol(col: number, y: number, isRightFrozen?: boolean) {\n // 基准线\n const colX = getColX(col, this.table, isRightFrozen);\n // this.columnResizeLine.setAttribute('x', x);\n this.columnResizeLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n this.columnResizeBgLine.setAttributes({\n x: colX,\n points: [\n { x: 0, y: 0 },\n { x: 0, y: this.table.getRowsHeight(0, this.table.rowCount - 1) } // todo: 优化points赋值\n ]\n });\n\n // 标签\n this.columnResizeLabel.setAttributes({\n x: colX,\n y\n });\n (this.columnResizeLabel.lastChild as Text).setAttribute('text', `${Math.floor(this.table.getColWidth(col))}px`);\n }\n\n /**\n * @description: 隐藏列顺序调整组件\n * @return {*}\n */\n hideMoveCol() {\n this.cellMover.hide();\n }\n\n /**\n * @description: 显示列顺序调整组件\n * @param {number} col\n * @param {number} x\n * @return {*}\n */\n showMoveCol(col: number, row: number, delta: number) {\n this.cellMover.show(col, row, delta);\n }\n\n /**\n * @description: 更新列顺序调整组件\n * @param {number} backX\n * @param {number} lineX\n * @return {*}\n */\n updateMoveCol(backX: number, lineX: number, backY: number, lineY: number) {\n this.cellMover.update(backX, lineX, backY, lineY);\n }\n\n /**\n * @description: 显示冻结列shadow\n * @param {number} col\n * @return {*}\n */\n setFrozenColumnShadow(col: number, isRightFrozen?: boolean) {\n if (col < 0) {\n this.frozenShadowLine.setAttributes({\n visible: false\n });\n } else {\n // const colX = this.table.getColsWidth(0, col);\n const colX = getColX(col, this.table, isRightFrozen);\n this.frozenShadowLine.setAttributes({\n visible: true,\n x: colX,\n height: this.table.getRowsHeight(0, this.table.rowCount - 1)\n });\n }\n }\n\n hideVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', false);\n this.vScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showVerticalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.vScrollBar.setAttribute('visible', true);\n this.vScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n hideHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', false);\n this.hScrollBar.hideAll();\n this.table.scenegraph.updateNextFrame();\n }\n showHorizontalScrollBar() {\n const visable = this.table.theme.scrollStyle.visible;\n if (visable !== 'focus' && visable !== 'scrolling') {\n return;\n }\n this.hScrollBar.setAttribute('visible', true);\n this.hScrollBar.showAll();\n this.table.scenegraph.updateNextFrame();\n }\n updateVerticalScrollBarPos(topRatio: number) {\n const range = this.vScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = topRatio * (1 - size);\n this.vScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.vScrollBar.AABBBounds && this.vScrollBar.globalAABBBounds;\n (this.vScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n updateHorizontalScrollBarPos(leftRatio: number) {\n const range = this.hScrollBar.attribute.range;\n const size = range[1] - range[0];\n const range0 = leftRatio * (1 - size);\n this.hScrollBar.setAttribute('range', [range0, range0 + size]);\n const bounds = this.hScrollBar.AABBBounds && this.hScrollBar.globalAABBBounds;\n (this.hScrollBar as any)._viewPosition = {\n x: bounds.x1,\n y: bounds.y1\n };\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IGroup, IContext2d, IGroupGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IGroupRenderContribution, IDrawContext } from '@visactor/vrender';
|
|
1
|
+
import type { IGroup, IContext2d, IGroupGraphicAttribute, IMarkAttribute, IGraphicAttribute, IThemeAttribute, IGroupRenderContribution, IDrawContext, IRectGraphicAttribute } from '@visactor/vrender';
|
|
2
2
|
import { BaseRenderContributionTime } from '@visactor/vrender';
|
|
3
3
|
export declare class SplitGroupBeforeRenderContribution implements IGroupRenderContribution {
|
|
4
4
|
time: BaseRenderContributionTime;
|
|
@@ -22,7 +22,7 @@ export declare function getWidthInfo(widthArray: number[] | number): {
|
|
|
22
22
|
isSplitDraw: boolean;
|
|
23
23
|
width?: undefined;
|
|
24
24
|
};
|
|
25
|
-
export declare function renderStroke(group: IGroup, context: IContext2d, x: number, y: number, groupAttribute: Required<IGroupGraphicAttribute>, stroke: boolean | [boolean, boolean, boolean, boolean], strokeArrayWidth: [number, number, number, number] | undefined, strokeArrayColor: [string, string, string, string] | undefined, width: number, height: number, isHighlight?: boolean, part?: ([number, number] | undefined)[]): void;
|
|
25
|
+
export declare function renderStroke(group: IGroup, context: IContext2d, x: number, y: number, groupAttribute: Required<IGroupGraphicAttribute> | Required<IRectGraphicAttribute>, stroke: boolean | [boolean, boolean, boolean, boolean], strokeArrayWidth: [number, number, number, number] | undefined, strokeArrayColor: [string, string, string, string] | undefined, width: number, height: number, isHighlight?: boolean, part?: ([number, number] | undefined)[]): void;
|
|
26
26
|
export declare class DashGroupBeforeRenderContribution implements IGroupRenderContribution {
|
|
27
27
|
time: BaseRenderContributionTime;
|
|
28
28
|
useStyle: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/graphic/contributions/group-contribution-render.ts"],"names":[],"mappings":";;;;;;AAUA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAO9C,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,0BAA0B,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,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EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,SAAS,EAAE;YACb,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;YACxB,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SACzB;QAED,IAAI,KAAK,IAAI,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} from '@visactor/vrender';\nimport { BaseRenderContributionTime, injectable } from '@visactor/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>,\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) && (!strokeArrayColor || strokeArrayColor[0])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[0];\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) && (!strokeArrayColor || strokeArrayColor[1])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[1];\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) && (!strokeArrayColor || strokeArrayColor[2])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[2];\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) && (!strokeArrayColor || strokeArrayColor[3])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[3];\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 } = 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 context.rect(x, y, widthFroDraw, heightFroDraw);\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\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,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAO9C,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAAxC;QACL,SAAI,GAA+B,0BAA0B,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,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D,IAAI,SAAS,EAAE;YACb,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;YACxB,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC;SACzB;QAED,IAAI,KAAK,IAAI,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 '@visactor/vrender';\nimport { BaseRenderContributionTime, injectable } from '@visactor/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) && (!strokeArrayColor || strokeArrayColor[0])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[0];\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) && (!strokeArrayColor || strokeArrayColor[1])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[1];\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) && (!strokeArrayColor || strokeArrayColor[2])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[2];\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) && (!strokeArrayColor || strokeArrayColor[3])) {\n if (strokeArrayColor) {\n context.strokeStyle = strokeArrayColor[3];\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 } = 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 context.rect(x, y, widthFroDraw, heightFroDraw);\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\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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/graphic/contributions/rect-contribution-render.ts"],"names":[],"mappings":";;;;;;AAYA,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGpD,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAAvC;QACL,SAAI,GAA+B,0BAA0B,CAAC,gBAAgB,CAAC;QAC/E,aAAQ,GAAY,IAAI,CAAC;QACzB,UAAK,GAAW,CAAC,CAAC;IAwCpB,CAAC;IAvCC,SAAS,CACP,IAAW,EACX,OAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAAiB,EACjB,QAAiB,EACjB,QAAiB,EACjB,aAA8C,EAC9C,WAAyB,EACzB,MAIY,EACZ,QAIY,EACZ,cAAuD;QAQvD,MAAM,EACJ,MAAM,GAAG,aAAa,CAAC,MAAM,EAC7B,gBAAgB,GAAI,aAAqB,CAAC,gBAAgB,EAC1D,gBAAgB,GAAI,aAAqB,CAAC,gBAAgB,EAC3D,GAAG,IAAI,CAAC,S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,IAAI,SAAS,GAAG,CAAC,CAAC;gBAChD,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAC9E;gBACA,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;gBACxB,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;aACzB;YACD,YAAY,CACV,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,CAAC,EAChB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAClB,CAAC;SACH;IACH,CAAC;CACF,CAAA;AAlHY,gCAAgC;IAD5C,UAAU,EAAE;GACA,gCAAgC,CAkH5C;SAlHY,gCAAgC;AAqH7C,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 '@visactor/vrender';\nimport { BaseRenderContributionTime, injectable } from '@visactor/vrender';\nimport { renderStroke } from './group-contribution-render';\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 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 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),\n Math.ceil(height)\n );\n }\n }\n}\n\n// 判断是否为整数,如果是整数,需要偏移0.5px\nfunction isInteger(num: number) {\n return num % 1 === 0;\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { ITextGraphicAttribute, IWrapTextGraphicAttribute } from '@visactor/vrender';
|
|
2
|
-
export { WrapText } from '@visactor/vrender';
|
|
2
|
+
export { Text as WrapText } from '@visactor/vrender';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { WrapText } from "@visactor/vrender";
|
|
1
|
+
export { Text as WrapText } from "@visactor/vrender";
|
|
2
2
|
//# sourceMappingURL=text.js.map
|