@visactor/vtable 0.9.2-alpha.3 → 0.9.2
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 -2
- package/cjs/ListTable.js +13 -17
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -2
- package/cjs/PivotTable.js +13 -18
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/MultilineTextStyle.js +2 -2
- package/cjs/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/cjs/body-helper/style/ProgressBarStyle.js +15 -15
- package/cjs/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/cjs/body-helper/style/Style.d.ts +1 -0
- package/cjs/body-helper/style/Style.js +28 -25
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +5 -18
- package/cjs/core/BaseTable.js +37 -94
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +0 -3
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -4
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/core/tableHelper.js +2 -1
- package/cjs/data/CachedDataSource.js +1 -2
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +19 -12
- package/cjs/dataset/dataset.js +196 -168
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/EventHandler.js.map +1 -1
- package/cjs/event/EventTarget.d.ts +5 -5
- package/cjs/event/EventTarget.js +2 -2
- package/cjs/event/EventTarget.js.map +1 -1
- package/cjs/event/event.js +4 -7
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +6 -8
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/event/util.js +1 -0
- package/cjs/header-helper/header-helper.js +1 -1
- package/cjs/header-helper/header-helper.js.map +1 -1
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/cjs/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/cjs/header-helper/style/Style.d.ts +1 -0
- package/cjs/header-helper/style/Style.js +28 -25
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +3 -4
- package/cjs/index.js +2 -11
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +1 -2
- package/cjs/layout/pivot-header-layout.d.ts +5 -11
- package/cjs/layout/pivot-header-layout.js +12 -42
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +8 -53
- package/cjs/layout/pivot-layout.js +89 -393
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +0 -8
- package/cjs/layout/simple-header-layout.js +0 -34
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/{es/components → cjs}/menu/dom/BaseMenu.d.ts +2 -2
- package/cjs/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/menu/dom/Menu.js.map +1 -0
- package/cjs/{components/menu → menu}/dom/MenuHandler.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/MenuHandler.js +1 -1
- package/cjs/menu/dom/MenuHandler.js.map +1 -0
- package/{es/components → cjs}/menu/dom/logic/MenuContainer.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/logic/MenuContainer.js +2 -2
- package/cjs/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/{components/menu → menu}/dom/logic/MenuElement.d.ts +2 -2
- package/cjs/{components/menu → menu}/dom/logic/MenuElement.js +4 -4
- package/cjs/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/cjs/scenegraph/component/table-component.js +3 -3
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +0 -3
- package/cjs/scenegraph/graphic/chart.js +6 -21
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +3 -15
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +3 -8
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/column.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +35 -29
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/auto-width.d.ts +2 -0
- package/cjs/scenegraph/layout/auto-width.js +85 -0
- package/cjs/scenegraph/layout/auto-width.js.map +1 -0
- package/cjs/scenegraph/layout/compute-col-width.js +15 -23
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +9 -20
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-cell.js +2 -3
- package/cjs/scenegraph/layout/update-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-height.js +1 -1
- package/cjs/scenegraph/layout/update-height.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +1 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -1
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.d.ts +0 -3
- package/cjs/scenegraph/refresh-node/update-chart.js +5 -48
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +0 -9
- package/cjs/scenegraph/scenegraph.js +18 -144
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +8 -10
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js +5 -1
- package/cjs/scenegraph/style/frame-border.js.map +1 -1
- package/cjs/state/state.js +1 -1
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/DEFAULT.js +2 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -2
- package/cjs/tools/calc.d.ts +0 -3
- package/cjs/tools/calc.js +3 -11
- package/cjs/tools/calc.js.map +1 -1
- package/cjs/tools/diff-cell.js +2 -2
- package/cjs/tools/dom.js +1 -1
- package/cjs/tools/env.js +1 -1
- package/{es/components → cjs}/tooltip/BaseTooltip.d.ts +3 -3
- package/cjs/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/tooltip/Tooltip.js.map +1 -0
- package/{es/components → cjs}/tooltip/TooltipHandler.d.ts +4 -4
- package/cjs/{components/tooltip → tooltip}/TooltipHandler.js +1 -1
- package/cjs/tooltip/TooltipHandler.js.map +1 -0
- package/{es/components → cjs}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElement.js +1 -1
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/cjs/ts-types/base-table.d.ts +12 -29
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +1 -0
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/events.d.ts +83 -100
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +0 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +5 -18
- package/cjs/ts-types/new-data-set.js +2 -2
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +0 -4
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +1 -3
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +3 -3
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +0 -1
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/title.d.ts +1 -1
- package/cjs/ts-types/pivot-table/title.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +3 -27
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +11839 -22467
- package/dist/vtable.min.js +2 -4
- package/es/ListTable.d.ts +1 -2
- package/es/ListTable.js +13 -17
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -2
- package/es/PivotTable.js +14 -19
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/MultilineTextStyle.js +2 -2
- package/es/body-helper/style/MultilineTextStyle.js.map +1 -1
- package/es/body-helper/style/ProgressBarStyle.js +15 -15
- package/es/body-helper/style/ProgressBarStyle.js.map +1 -1
- package/es/body-helper/style/Style.d.ts +1 -0
- package/es/body-helper/style/Style.js +28 -25
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/core/BaseTable.d.ts +5 -18
- package/es/core/BaseTable.js +39 -98
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +0 -3
- package/es/core/TABLE_EVENT_TYPE.js +1 -4
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/core/tableHelper.js +2 -1
- package/es/data/CachedDataSource.js +1 -2
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +19 -12
- package/es/dataset/dataset.js +187 -161
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/EventHandler.js.map +1 -1
- package/es/event/EventTarget.d.ts +5 -5
- package/es/event/EventTarget.js +2 -2
- package/es/event/EventTarget.js.map +1 -1
- package/es/event/event.js +3 -8
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +6 -8
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/sparkline-event.js.map +1 -1
- package/es/event/util.js +2 -1
- package/es/header-helper/header-helper.js +1 -1
- package/es/header-helper/header-helper.js.map +1 -1
- package/es/header-helper/style/MultilineTextHeaderStyle.js +2 -2
- package/es/header-helper/style/MultilineTextHeaderStyle.js.map +1 -1
- package/es/header-helper/style/Style.d.ts +1 -0
- package/es/header-helper/style/Style.js +28 -25
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +3 -4
- package/es/index.js +2 -4
- package/es/index.js.map +1 -1
- package/es/layout/index.js +1 -2
- package/es/layout/pivot-header-layout.d.ts +5 -11
- package/es/layout/pivot-header-layout.js +11 -41
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +8 -53
- package/es/layout/pivot-layout.js +87 -396
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +0 -8
- package/es/layout/simple-header-layout.js +0 -34
- package/es/layout/simple-header-layout.js.map +1 -1
- package/{cjs/components → es}/menu/dom/BaseMenu.d.ts +2 -2
- package/es/menu/dom/BaseMenu.js.map +1 -0
- package/es/menu/dom/Menu.js.map +1 -0
- package/es/{components/menu → menu}/dom/MenuHandler.d.ts +2 -2
- package/es/{components/menu → menu}/dom/MenuHandler.js +2 -2
- package/es/menu/dom/MenuHandler.js.map +1 -0
- package/{cjs/components → es}/menu/dom/logic/MenuContainer.d.ts +2 -2
- package/es/{components/menu → menu}/dom/logic/MenuContainer.js +4 -4
- package/es/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/{components/menu → menu}/dom/logic/MenuElement.d.ts +2 -2
- package/es/{components/menu → menu}/dom/logic/MenuElement.js +9 -9
- package/es/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/es/scenegraph/component/table-component.js +3 -3
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +0 -3
- package/es/scenegraph/graphic/chart.js +5 -22
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +3 -15
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -9
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +1 -2
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/column.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +34 -27
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +6 -6
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/auto-width.d.ts +2 -0
- package/es/scenegraph/layout/auto-width.js +82 -0
- package/es/scenegraph/layout/auto-width.js.map +1 -0
- package/es/scenegraph/layout/compute-col-width.js +15 -23
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +9 -20
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-cell.js +1 -3
- package/es/scenegraph/layout/update-cell.js.map +1 -1
- package/es/scenegraph/layout/update-height.js +1 -1
- package/es/scenegraph/layout/update-height.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +1 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -1
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.d.ts +0 -3
- package/es/scenegraph/refresh-node/update-chart.js +4 -45
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +0 -9
- package/es/scenegraph/scenegraph.js +19 -146
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +8 -10
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.js +5 -1
- package/es/scenegraph/style/frame-border.js.map +1 -1
- package/es/state/state.js +1 -1
- package/es/state/state.js.map +1 -1
- package/es/themes/DEFAULT.js +2 -1
- package/es/tools/LimitPromiseQueue.js +1 -2
- package/es/tools/calc.d.ts +0 -3
- package/es/tools/calc.js +0 -10
- package/es/tools/calc.js.map +1 -1
- package/es/tools/diff-cell.js +1 -1
- package/es/tools/dom.js +1 -1
- package/es/tools/env.js +1 -1
- package/{cjs/components → es}/tooltip/BaseTooltip.d.ts +3 -3
- package/es/tooltip/BaseTooltip.js.map +1 -0
- package/es/tooltip/Tooltip.js.map +1 -0
- package/{cjs/components → es}/tooltip/TooltipHandler.d.ts +4 -4
- package/es/{components/tooltip → tooltip}/TooltipHandler.js +4 -4
- package/es/tooltip/TooltipHandler.js.map +1 -0
- package/{cjs/components → es}/tooltip/logic/BubbleTooltipElement.d.ts +4 -4
- package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElement.js +4 -4
- package/es/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/es/ts-types/base-table.d.ts +12 -29
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +1 -0
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/events.d.ts +83 -100
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +0 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +5 -18
- package/es/ts-types/new-data-set.js +2 -2
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.d.ts +0 -4
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +0 -4
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +3 -3
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/index.d.ts +0 -1
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/pivot-table/title.d.ts +1 -1
- package/es/ts-types/pivot-table/title.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +3 -27
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +8 -14
- package/cjs/PivotChart.d.ts +0 -68
- package/cjs/PivotChart.js +0 -427
- package/cjs/PivotChart.js.map +0 -1
- package/cjs/components/axis/axis.d.ts +0 -45
- package/cjs/components/axis/axis.js +0 -146
- package/cjs/components/axis/axis.js.map +0 -1
- package/cjs/components/axis/band-scale.d.ts +0 -18
- package/cjs/components/axis/band-scale.js +0 -54
- package/cjs/components/axis/band-scale.js.map +0 -1
- package/cjs/components/axis/get-axis-attributes.d.ts +0 -136
- package/cjs/components/axis/get-axis-attributes.js +0 -169
- package/cjs/components/axis/get-axis-attributes.js.map +0 -1
- package/cjs/components/axis/label-overlap.d.ts +0 -3
- package/cjs/components/axis/label-overlap.js +0 -46
- package/cjs/components/axis/label-overlap.js.map +0 -1
- package/cjs/components/axis/linear-scale.d.ts +0 -45
- package/cjs/components/axis/linear-scale.js +0 -120
- package/cjs/components/axis/linear-scale.js.map +0 -1
- package/cjs/components/legend/get-legend-attributes.d.ts +0 -5
- package/cjs/components/legend/get-legend-attributes.js +0 -90
- package/cjs/components/legend/get-legend-attributes.js.map +0 -1
- package/cjs/components/legend/legend.d.ts +0 -23
- package/cjs/components/legend/legend.js +0 -94
- package/cjs/components/legend/legend.js.map +0 -1
- package/cjs/components/menu/dom/BaseMenu.js.map +0 -1
- package/cjs/components/menu/dom/Menu.js.map +0 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuElement.js.map +0 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/cjs/components/title/title.d.ts +0 -12
- package/cjs/components/title/title.js +0 -66
- package/cjs/components/title/title.js.map +0 -1
- package/cjs/components/tooltip/BaseTooltip.js.map +0 -1
- package/cjs/components/tooltip/Tooltip.js.map +0 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +0 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/cjs/components/util/orient.d.ts +0 -3
- package/cjs/components/util/orient.js +0 -14
- package/cjs/components/util/orient.js.map +0 -1
- package/cjs/components/util/register.d.ts +0 -3
- package/cjs/components/util/register.js +0 -15
- package/cjs/components/util/register.js.map +0 -1
- package/cjs/components/util/tick-data/config.d.ts +0 -1
- package/cjs/components/util/tick-data/config.js +0 -6
- package/cjs/components/util/tick-data/config.js.map +0 -1
- package/cjs/components/util/tick-data/continuous.d.ts +0 -2
- package/cjs/components/util/tick-data/continuous.js +0 -39
- package/cjs/components/util/tick-data/continuous.js.map +0 -1
- package/cjs/components/util/tick-data/discrete/linear.d.ts +0 -2
- package/cjs/components/util/tick-data/discrete/linear.js +0 -66
- package/cjs/components/util/tick-data/discrete/linear.js.map +0 -1
- package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +0 -2
- package/cjs/components/util/tick-data/discrete/polar-angle.js +0 -46
- package/cjs/components/util/tick-data/discrete/polar-angle.js.map +0 -1
- package/cjs/components/util/tick-data/index.d.ts +0 -2
- package/cjs/components/util/tick-data/index.js +0 -17
- package/cjs/components/util/tick-data/index.js.map +0 -1
- package/cjs/components/util/tick-data/util.d.ts +0 -21
- package/cjs/components/util/tick-data/util.js +0 -115
- package/cjs/components/util/tick-data/util.js.map +0 -1
- package/cjs/components/util/transform.d.ts +0 -5
- package/cjs/components/util/transform.js +0 -45
- package/cjs/components/util/transform.js.map +0 -1
- package/cjs/dataset/statistics-helper.d.ts +0 -68
- package/cjs/dataset/statistics-helper.js +0 -173
- package/cjs/dataset/statistics-helper.js.map +0 -1
- package/cjs/dataset/util/zero-align.d.ts +0 -10
- package/cjs/dataset/util/zero-align.js +0 -119
- package/cjs/dataset/util/zero-align.js.map +0 -1
- package/cjs/event/VChartEventProxy.d.ts +0 -1
- package/cjs/event/VChartEventProxy.js +0 -1
- package/cjs/event/VChartEventProxy.js.map +0 -1
- package/cjs/event/pivot-chart/axis-click.d.ts +0 -2
- package/cjs/event/pivot-chart/axis-click.js +0 -42
- package/cjs/event/pivot-chart/axis-click.js.map +0 -1
- package/cjs/layout/pivot-chart/get-axis-config.d.ts +0 -2
- package/cjs/layout/pivot-chart/get-axis-config.js +0 -118
- package/cjs/layout/pivot-chart/get-axis-config.js.map +0 -1
- package/cjs/layout/pivot-chart/get-chart-spec.d.ts +0 -4
- package/cjs/layout/pivot-chart/get-chart-spec.js +0 -118
- package/cjs/layout/pivot-chart/get-chart-spec.js.map +0 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +0 -3
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +0 -71
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +0 -1
- package/cjs/ts-types/component/axis.d.ts +0 -12
- package/cjs/ts-types/component/axis.js +0 -6
- package/cjs/ts-types/component/axis.js.map +0 -1
- package/cjs/ts-types/component/legend.d.ts +0 -5
- package/cjs/ts-types/component/legend.js +0 -6
- package/cjs/ts-types/component/legend.js.map +0 -1
- package/cjs/ts-types/component/title.d.ts +0 -47
- package/cjs/ts-types/component/title.js +0 -6
- package/cjs/ts-types/component/title.js.map +0 -1
- package/cjs/ts-types/component/util.d.ts +0 -1
- package/cjs/ts-types/component/util.js +0 -6
- package/cjs/ts-types/component/util.js.map +0 -1
- package/es/PivotChart.d.ts +0 -68
- package/es/PivotChart.js +0 -437
- package/es/PivotChart.js.map +0 -1
- package/es/components/axis/axis.d.ts +0 -45
- package/es/components/axis/axis.js +0 -155
- package/es/components/axis/axis.js.map +0 -1
- package/es/components/axis/band-scale.d.ts +0 -18
- package/es/components/axis/band-scale.js +0 -46
- package/es/components/axis/band-scale.js.map +0 -1
- package/es/components/axis/get-axis-attributes.d.ts +0 -136
- package/es/components/axis/get-axis-attributes.js +0 -166
- package/es/components/axis/get-axis-attributes.js.map +0 -1
- package/es/components/axis/label-overlap.d.ts +0 -3
- package/es/components/axis/label-overlap.js +0 -39
- package/es/components/axis/label-overlap.js.map +0 -1
- package/es/components/axis/linear-scale.d.ts +0 -45
- package/es/components/axis/linear-scale.js +0 -104
- package/es/components/axis/linear-scale.js.map +0 -1
- package/es/components/legend/get-legend-attributes.d.ts +0 -5
- package/es/components/legend/get-legend-attributes.js +0 -84
- package/es/components/legend/get-legend-attributes.js.map +0 -1
- package/es/components/legend/legend.d.ts +0 -23
- package/es/components/legend/legend.js +0 -93
- package/es/components/legend/legend.js.map +0 -1
- package/es/components/menu/dom/BaseMenu.js.map +0 -1
- package/es/components/menu/dom/Menu.js.map +0 -1
- package/es/components/menu/dom/MenuHandler.js.map +0 -1
- package/es/components/menu/dom/logic/MenuContainer.js.map +0 -1
- package/es/components/menu/dom/logic/MenuElement.js.map +0 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/es/components/title/title.d.ts +0 -12
- package/es/components/title/title.js +0 -61
- package/es/components/title/title.js.map +0 -1
- package/es/components/tooltip/BaseTooltip.js.map +0 -1
- package/es/components/tooltip/Tooltip.js.map +0 -1
- package/es/components/tooltip/TooltipHandler.js.map +0 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/es/components/util/orient.d.ts +0 -3
- package/es/components/util/orient.js +0 -8
- package/es/components/util/orient.js.map +0 -1
- package/es/components/util/register.d.ts +0 -3
- package/es/components/util/register.js +0 -8
- package/es/components/util/register.js.map +0 -1
- package/es/components/util/tick-data/config.d.ts +0 -1
- package/es/components/util/tick-data/config.js +0 -2
- package/es/components/util/tick-data/config.js.map +0 -1
- package/es/components/util/tick-data/continuous.d.ts +0 -2
- package/es/components/util/tick-data/continuous.js +0 -38
- package/es/components/util/tick-data/continuous.js.map +0 -1
- package/es/components/util/tick-data/discrete/linear.d.ts +0 -2
- package/es/components/util/tick-data/discrete/linear.js +0 -59
- package/es/components/util/tick-data/discrete/linear.js.map +0 -1
- package/es/components/util/tick-data/discrete/polar-angle.d.ts +0 -2
- package/es/components/util/tick-data/discrete/polar-angle.js +0 -39
- package/es/components/util/tick-data/discrete/polar-angle.js.map +0 -1
- package/es/components/util/tick-data/index.d.ts +0 -2
- package/es/components/util/tick-data/index.js +0 -19
- package/es/components/util/tick-data/index.js.map +0 -1
- package/es/components/util/tick-data/util.d.ts +0 -21
- package/es/components/util/tick-data/util.js +0 -104
- package/es/components/util/tick-data/util.js.map +0 -1
- package/es/components/util/transform.d.ts +0 -5
- package/es/components/util/transform.js +0 -34
- package/es/components/util/transform.js.map +0 -1
- package/es/dataset/statistics-helper.d.ts +0 -68
- package/es/dataset/statistics-helper.js +0 -152
- package/es/dataset/statistics-helper.js.map +0 -1
- package/es/dataset/util/zero-align.d.ts +0 -10
- package/es/dataset/util/zero-align.js +0 -111
- package/es/dataset/util/zero-align.js.map +0 -1
- package/es/event/VChartEventProxy.d.ts +0 -1
- package/es/event/VChartEventProxy.js +0 -1
- package/es/event/VChartEventProxy.js.map +0 -1
- package/es/event/pivot-chart/axis-click.d.ts +0 -2
- package/es/event/pivot-chart/axis-click.js +0 -36
- package/es/event/pivot-chart/axis-click.js.map +0 -1
- package/es/layout/pivot-chart/get-axis-config.d.ts +0 -2
- package/es/layout/pivot-chart/get-axis-config.js +0 -110
- package/es/layout/pivot-chart/get-axis-config.js.map +0 -1
- package/es/layout/pivot-chart/get-chart-spec.d.ts +0 -4
- package/es/layout/pivot-chart/get-chart-spec.js +0 -109
- package/es/layout/pivot-chart/get-chart-spec.js.map +0 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.d.ts +0 -3
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +0 -65
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +0 -1
- package/es/ts-types/component/axis.d.ts +0 -12
- package/es/ts-types/component/axis.js +0 -2
- package/es/ts-types/component/axis.js.map +0 -1
- package/es/ts-types/component/legend.d.ts +0 -5
- package/es/ts-types/component/legend.js +0 -2
- package/es/ts-types/component/legend.js.map +0 -1
- package/es/ts-types/component/title.d.ts +0 -47
- package/es/ts-types/component/title.js +0 -2
- package/es/ts-types/component/title.js.map +0 -1
- package/es/ts-types/component/util.d.ts +0 -1
- package/es/ts-types/component/util.js +0 -2
- package/es/ts-types/component/util.js.map +0 -1
- /package/cjs/{components/menu → menu}/dom/BaseMenu.js +0 -0
- /package/cjs/{components/menu → menu}/dom/Menu.d.ts +0 -0
- /package/cjs/{components/menu → menu}/dom/Menu.js +0 -0
- /package/cjs/{components/menu → menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/cjs/{components/menu → menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/BaseTooltip.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/Tooltip.d.ts +0 -0
- /package/cjs/{components/tooltip → tooltip}/Tooltip.js +0 -0
- /package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/cjs/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/es/{components/menu → menu}/dom/BaseMenu.js +0 -0
- /package/es/{components/menu → menu}/dom/Menu.d.ts +0 -0
- /package/es/{components/menu → menu}/dom/Menu.js +0 -0
- /package/es/{components/menu → menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/es/{components/menu → menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/es/{components/tooltip → tooltip}/BaseTooltip.js +0 -0
- /package/es/{components/tooltip → tooltip}/Tooltip.d.ts +0 -0
- /package/es/{components/tooltip → tooltip}/Tooltip.js +0 -0
- /package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/es/{components/tooltip → tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
|
@@ -36,8 +36,6 @@ import { createColGroup } from "../column";
|
|
|
36
36
|
|
|
37
37
|
import { createComplexColumn } from "../column-helper";
|
|
38
38
|
|
|
39
|
-
import { createGroupForFirstScreen } from "./create-group-for-first-screen";
|
|
40
|
-
|
|
41
39
|
import { dynamicSetX } from "./update-position/dynamic-set-x";
|
|
42
40
|
|
|
43
41
|
import { dynamicSetY } from "./update-position/dynamic-set-y";
|
|
@@ -52,7 +50,7 @@ export class SceneProxy {
|
|
|
52
50
|
this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
|
|
53
51
|
}
|
|
54
52
|
setParamsForColumn() {
|
|
55
|
-
this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1
|
|
53
|
+
this.bodyLeftCol = this.table.rowHeaderLevelCount, this.bodyRightCol = this.table.colCount - 1;
|
|
56
54
|
const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);
|
|
57
55
|
this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1, this.colStart = this.bodyLeftCol;
|
|
58
56
|
const defaultColWidth = this.table.defaultColWidth;
|
|
@@ -65,7 +63,8 @@ export class SceneProxy {
|
|
|
65
63
|
this.colUpdatePos = this.bodyRightCol;
|
|
66
64
|
}
|
|
67
65
|
setParamsForRow() {
|
|
68
|
-
this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1
|
|
66
|
+
this.bodyTopRow = this.table.columnHeaderLevelCount, this.bodyBottomRow = this.table.rowCount - 1,
|
|
67
|
+
this.bodyLeftCol = 0, this.bodyRightCol = this.table.colCount - 1;
|
|
69
68
|
const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1);
|
|
70
69
|
this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1, this.rowStart = this.bodyTopRow;
|
|
71
70
|
const defaultRowHeight = this.table.defaultRowHeight;
|
|
@@ -77,9 +76,30 @@ export class SceneProxy {
|
|
|
77
76
|
this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight),
|
|
78
77
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
79
78
|
}
|
|
80
|
-
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup,
|
|
79
|
+
createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, bodyGroup, xOrigin, yOrigin) {
|
|
80
|
+
var _a, _b, _c, _d;
|
|
81
81
|
return __awaiter(this, void 0, void 0, (function*() {
|
|
82
|
-
|
|
82
|
+
this.setParamsForRow(), this.setParamsForColumn(), this.table.internalProps._colWidthsMap.clear(),
|
|
83
|
+
this.table._clearColRangeWidthsMap(), computeColsWidth(this.table, 0, Math.min(this.firstScreenColLimit, this.table.colCount - 1)),
|
|
84
|
+
this.table.internalProps._rowHeightsMap.clear(), this.table._clearRowRangeHeightsMap(),
|
|
85
|
+
computeRowsHeight(this.table, 0, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1)),
|
|
86
|
+
this.table.scenegraph.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth()),
|
|
87
|
+
this.table.scenegraph.rowHeaderGroup.setAttribute("y", this.table.getFrozenRowsHeight()),
|
|
88
|
+
this.table.scenegraph.bodyGroup.setAttributes({
|
|
89
|
+
x: this.table.getFrozenColsWidth(),
|
|
90
|
+
y: this.table.getFrozenRowsHeight()
|
|
91
|
+
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, 0, this.table.columnHeaderLevelCount - 1, "cornerHeader", this.table),
|
|
92
|
+
createColGroup(colHeaderGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), 0, this.table.columnHeaderLevelCount - 1, "columnHeader", this.table),
|
|
93
|
+
createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, this.table.rowHeaderLevelCount - 1, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "rowHeader", this.table),
|
|
94
|
+
createColGroup(bodyGroup, xOrigin, yOrigin, this.table.rowHeaderLevelCount, Math.min(this.firstScreenColLimit, this.table.colCount - 1), this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), "body", this.table),
|
|
95
|
+
bodyGroup.firstChild ? (this.currentRow = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : this.totalRow,
|
|
96
|
+
this.rowEnd = this.currentRow, this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
97
|
+
this.currentCol = null !== (_d = null === (_c = bodyGroup.lastChild) || void 0 === _c ? void 0 : _c.col) && void 0 !== _d ? _d : this.totalCol,
|
|
98
|
+
this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd, this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2),
|
|
99
|
+
yield this.progress()) : (this.currentRow = this.totalRow, this.rowEnd = this.currentRow,
|
|
100
|
+
this.rowUpdatePos = this.rowEnd, this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2),
|
|
101
|
+
this.currentCol = this.totalCol, this.colEnd = this.currentCol, this.colUpdatePos = this.colEnd,
|
|
102
|
+
this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2));
|
|
83
103
|
}));
|
|
84
104
|
}
|
|
85
105
|
createColGroupForFirstScreen(rowHeaderGroup, bodyGroup, xOrigin, yOrigin, table) {
|
|
@@ -120,23 +140,10 @@ export class SceneProxy {
|
|
|
120
140
|
}
|
|
121
141
|
createRowCellGroup(onceCount) {
|
|
122
142
|
const endRow = Math.min(this.totalRow, this.currentRow + onceCount);
|
|
123
|
-
|
|
124
|
-
let maxHeight = 0;
|
|
125
|
-
for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {
|
|
126
|
-
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
127
|
-
maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rowHeaderGroup.setAttribute("height", maxHeight);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (this.table.rightFrozenColCount) {
|
|
131
|
-
let maxHeight = 0;
|
|
132
|
-
for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {
|
|
133
|
-
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "rowHeader", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
134
|
-
maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rightFrozenGroup.setAttribute("height", maxHeight);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
143
|
+
computeRowsHeight(this.table, this.currentRow + 1, endRow);
|
|
137
144
|
let maxHeight = 0;
|
|
138
145
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {
|
|
139
|
-
const colGroup = this.table.scenegraph.getColGroup(col), cellType = "body", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
146
|
+
const colGroup = this.table.scenegraph.getColGroup(col), cellType = col < this.table.rowHeaderLevelCount ? "rowHeader" : "body", {height: height} = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table, cellType);
|
|
140
147
|
maxHeight = Math.max(maxHeight, height);
|
|
141
148
|
}
|
|
142
149
|
this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.currentRow = endRow,
|
|
@@ -182,12 +189,12 @@ export class SceneProxy {
|
|
|
182
189
|
}
|
|
183
190
|
updateCellGroups(count) {
|
|
184
191
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
185
|
-
|
|
192
|
+
this.table.internalProps.autoRowHeight && computeRowsHeight(this.table, this.rowUpdatePos, distRow);
|
|
186
193
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = this.rowUpdatePos; row <= distRow; row++) {
|
|
187
194
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
188
195
|
this.updateCellGroupContent(cellGroup);
|
|
189
196
|
}
|
|
190
|
-
|
|
197
|
+
this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection),
|
|
191
198
|
this.rowUpdatePos = distRow + 1;
|
|
192
199
|
}
|
|
193
200
|
updateColCellGroupsAsync() {
|
|
@@ -224,21 +231,21 @@ export class SceneProxy {
|
|
|
224
231
|
this.highPerformanceGetCell(col, row).needUpdate = !0;
|
|
225
232
|
}
|
|
226
233
|
let syncTopRow, syncBottomRow;
|
|
227
|
-
|
|
234
|
+
this.table.internalProps.autoRowHeight ? (syncTopRow = this.rowStart, syncBottomRow = this.rowEnd) : (syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - 2 * this.screenRowCount),
|
|
228
235
|
syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + 3 * this.screenRowCount)),
|
|
229
|
-
console.log("sort更新同步范围", syncTopRow, syncBottomRow),
|
|
236
|
+
console.log("sort更新同步范围", syncTopRow, syncBottomRow), this.table.internalProps.autoRowHeight && computeRowsHeight(this.table, syncTopRow, syncBottomRow);
|
|
230
237
|
for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
231
238
|
const cellGroup = this.highPerformanceGetCell(col, row);
|
|
232
239
|
this.updateCellGroupContent(cellGroup);
|
|
233
240
|
}
|
|
234
241
|
if (console.log("updateAutoRow", this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
235
|
-
|
|
242
|
+
this.table.internalProps.autoRowHeight && updateAutoRow(this.bodyLeftCol, this.bodyRightCol, syncTopRow, syncBottomRow, this.table, this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up"),
|
|
236
243
|
this.rowUpdatePos = this.rowStart, this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? "down" : "up",
|
|
237
244
|
this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow && this.rowStart === this.table.scenegraph.proxy.bodyTopRow) ; else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {
|
|
238
245
|
const top = this.table.getAllRowsHeight() - this.table.scenegraph.height;
|
|
239
246
|
this.updateBody(top);
|
|
240
247
|
} else this.rowStart === this.table.scenegraph.proxy.bodyTopRow && this.updateBody(0);
|
|
241
|
-
|
|
248
|
+
this.table.internalProps.autoRowHeight || (yield this.progress());
|
|
242
249
|
}));
|
|
243
250
|
}
|
|
244
251
|
highPerformanceGetCell(col, row, rowStart = this.rowStart, rowEnd = this.rowEnd, getShadow) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,MAAM,OAAO,UAAU;IAwCrB,YAAY,KAAmB;QAtC/B,SAAI,GAA+B,QAAQ,CAAC;QAE5C,aAAQ,GAAG,IAAI,CAAC;QAChB,eAAU,GAAG,CAAC,CAAC;QAIf,aAAQ,GAAG,CAAC,CAAC;QACb,WAAM,GAAG,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC;QAQjB,iBAAY,GAAW,CAAC,CAAC;QAEzB,aAAQ,GAAG,IAAI,CAAC;QAchB,kBAAa,GAAW,CAAC,CAAC;QAG1B,cAAS,GAAuB,IAAI,GAAG,EAAE,CAAC;QAGxC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE;YACtC,IA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,CAAC;YACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;YACpD,OAAO,SAAS,CAAC;SAClB;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { createGroupForFirstScreen } from './create-group-for-first-screen';\nimport { dynamicSetX } from './update-position/dynamic-set-x';\nimport { dynamicSetY } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n\n colLimit = 1000;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n // this.bodyRightCol = this.table.colCount - 1;\n this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1 - this.table.bottomFrozenRowCount;\n // this.bodyLeftCol = 0;\n // this.bodyRightCol = this.table.colCount - 1 - this.table.rightFrozenColCount;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n rightFrozenGroup: Group,\n bottomFrozenGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n await createGroupForFirstScreen(\n cornerHeaderGroup,\n colHeaderGroup,\n rowHeaderGroup,\n rightFrozenGroup,\n bottomFrozenGroup,\n bodyGroup,\n xOrigin,\n yOrigin,\n this\n );\n }\n\n async createColGroupForFirstScreen(\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n ) {\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute row height in first screen\n computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));\n\n // 生成首屏单元格\n // rowHeader\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table,\n this.firstScreenRowLimit\n );\n // body\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table,\n this.firstScreenRowLimit\n );\n\n // 更新row信息\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n // 开始异步任务\n await this.progress();\n }\n }\n\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow);\n\n if (this.table.rowHeaderLevelCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = 0; col < this.table.rowHeaderLevelCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rowHeaderGroup.setAttribute('height', maxHeight);\n }\n }\n\n if (this.table.rightFrozenColCount) {\n // create row header row cellGroup\n let maxHeight = 0;\n for (let col = this.table.colCount - this.table.rightFrozenColCount; col < this.table.colCount; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'rowHeader';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n this.table.scenegraph.rightFrozenGroup.setAttribute('height', maxHeight);\n }\n }\n\n // create body row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowUpdatePos; row <= distRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n for (let col = this.colUpdatePos; col <= distCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (colGroup) {\n // colGroup.forEachChildren((cellGroup: Group) => {\n // this.updateCellGroupContent(cellGroup);\n // });\n // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // this.updateCellGroupContent(cellGroup);\n // }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n // this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = cellGroup._next;\n const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n }\n }\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.heightMode === 'autoHeight') {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n if (this.table.heightMode === 'autoHeight') {\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.heightMode === 'autoHeight') {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (this.table.heightMode !== 'autoHeight') {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n rowStart: number = this.rowStart,\n rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n if (row < rowStart || row > rowEnd) {\n return emptyGroup;\n }\n if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n return emptyGroup;\n }\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/progress/proxy.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,MAAM,OAAO,UAAU;IAwCrB,YAAY,KAAmB;QAtC/B,SAAI,GAA+B,QAAQ,CAAC;QAE5C,aAAQ,GAAG,IAAI,CAAC;QAChB,eAAU,GAAG,CAAC,CAAC;QAIf,aAAQ,GAAG,CAAC,CAAC;QACb,WAAM,GAAG,CAAC,CAAC;QACX,iBAAY,GAAG,CAAC,CAAC;QAQjB,iBAAY,GAAW,CAAC,CAAC;QAEzB,aAAQ,GAAG,IAAI,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,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QACrE,SAAS,CAAC,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACpD,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,SAAS,cAAc,CAAC,cAAqB,EAAE,GAAW;IACxD,IAAI,CAAC,cAAc,EAAE;QACnB,OAAO,IAAI,CAAC;KACb;IACD,IAAI,cAAc,CAAC,GAAG,KAAK,GAAG,EAAE;QAC9B,OAAO,cAAc,CAAC;KACvB;SAAM,IAAI,cAAc,CAAC,GAAG,GAAG,GAAG,EAAE;QACnC,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;KAC3D;IACD,OAAO,cAAc,CAAC,cAAc,CAAC,KAAc,EAAE,GAAG,CAAC,CAAC;AAC5D,CAAC","file":"proxy.js","sourcesContent":["import type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { Group } from '../../graphic/group';\nimport { computeColsWidth } from '../../layout/compute-col-width';\nimport { computeRowsHeight } from '../../layout/compute-row-height';\nimport { emptyGroup } from '../../utils/empty-group';\nimport { createColGroup } from '../column';\nimport { createComplexColumn } from '../column-helper';\nimport { dynamicSetX } from './update-position/dynamic-set-x';\nimport { dynamicSetY } from './update-position/dynamic-set-y';\nimport { updateAutoRow } from './update-position/update-auto-row';\n\nexport class SceneProxy {\n table: BaseTableAPI;\n mode: 'column' | 'row' | 'pivot' = 'column';\n\n rowLimit = 1000;\n currentRow = 0; // 目前渐进生成的row number\n totalRow: number; // 渐进完成最后一行的row number\n yLimitTop: number; // y > yLimitTop动态更新,否则直接修改xy\n yLimitBottom: number; // y < yLimitBottom动态更新,否则直接修改xy\n rowStart = 0; // 当前维护的部分第一行的row number\n rowEnd = 0; // 当前维护的部分最后一行的row number\n referenceRow = 0; // 当前维护的部分中间一行的row number,认为referenceRow对应当前屏幕显示范围的第一行\n bodyTopRow: number; // table body部分的第一行row number\n bodyBottomRow: number; // table body部分的最后一行row number\n screenRowCount: number; // 预计屏幕范围内显示的row count\n firstScreenRowLimit: number; // 首屏同步加载部分最后一行的row number\n taskRowCount: number; // 一次任务生成/更新的row count\n rowUpdatePos: number; // 异步任务目前更新到的行的row number\n rowUpdateDirection: 'up' | 'down'; // 当前行更新的方向\n screenTopRow: number = 0; // 当前屏幕范围内显示的第一行的row number\n\n colLimit = 1000;\n bodyLeftCol: number; // table body部分的第一列col number\n bodyRightCol: number; // table body部分的最后一列col number\n totalCol: number; // 渐进完成最后一列的col number\n colStart: number; // 当前维护的部分第一列的col number\n colEnd: number; // 当前维护的部分最后一列的col number\n taskColCount: number; // 一次任务生成/更新的col count\n xLimitLeft: number; // x > xLimitLeft动态更新,否则直接修改xy\n xLimitRight: number; // x < xLimitRight动态更新,否则直接修改xy\n screenColCount: number; // 预计屏幕范围内显示的col count\n firstScreenColLimit: number; // 首屏同步加载部分最后一列的col number\n colUpdatePos: number; // 异步任务目前更新到的列的col number\n currentCol: number; // 目前渐进生成的col number\n referenceCol: number; // 当前维护的部分中间一列的col number,认为referenceCol对应当前屏幕显示范围的第一列\n screenLeftCol: number = 0; // 当前屏幕范围内显示的第一列的col number\n colUpdateDirection: 'left' | 'right'; // 当前列更新方向\n\n cellCache: Map<number, Group> = new Map(); // 单元格位置快速查找缓存\n\n constructor(table: BaseTableAPI) {\n this.table = table;\n\n if (this.table.internalProps.transpose) {\n this.mode = 'row';\n } else if (this.table.isPivotTable()) {\n this.mode = 'pivot';\n }\n if (this.table.options.maintainedDataCount) {\n this.rowLimit = this.table.options.maintainedDataCount;\n }\n }\n\n setParamsForColumn() {\n this.bodyLeftCol = this.table.rowHeaderLevelCount;\n this.bodyRightCol = this.table.colCount - 1;\n\n // compute the column info about progress creation\n const totalActualBodyColCount = Math.min(this.colLimit, this.bodyRightCol - this.bodyLeftCol + 1);\n this.totalCol = this.bodyLeftCol + totalActualBodyColCount - 1; // 目标渐进完成的col\n this.colStart = this.bodyLeftCol;\n const defaultColWidth = this.table.defaultColWidth;\n this.taskColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth) * 1;\n\n // 确定动态更新限制\n const totalBodyWidth = defaultColWidth * totalActualBodyColCount;\n const totalWidth = defaultColWidth * (this.bodyRightCol - this.bodyLeftCol + 1);\n this.xLimitLeft = totalBodyWidth / 2;\n this.xLimitRight = totalWidth - totalBodyWidth / 2;\n\n // 确定首屏高度范围\n const widthLimit = this.table.tableNoFrameWidth * 5;\n this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);\n this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.colUpdatePos = this.bodyRightCol;\n }\n\n setParamsForRow() {\n this.bodyTopRow = this.table.columnHeaderLevelCount;\n this.bodyBottomRow = this.table.rowCount - 1;\n this.bodyLeftCol = 0;\n this.bodyRightCol = this.table.colCount - 1;\n\n // 计算渐进加载数量\n const totalActualBodyRowCount = Math.min(this.rowLimit, this.bodyBottomRow - this.bodyTopRow + 1); // 渐进加载总row数量\n this.totalRow = this.bodyTopRow + totalActualBodyRowCount - 1; // 目标渐进完成的row\n this.rowStart = this.bodyTopRow;\n const defaultRowHeight = this.table.defaultRowHeight;\n this.taskRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight) * 1;\n\n // 确定动态更新限制\n const totalBodyHeight = defaultRowHeight * totalActualBodyRowCount;\n const totalHeight = defaultRowHeight * (this.bodyBottomRow - this.bodyTopRow + 1);\n this.yLimitTop = totalBodyHeight / 2;\n this.yLimitBottom = totalHeight - totalBodyHeight / 2;\n // this.bottomOffset = totalHeight - totalBodyHeight / 2;\n\n // 确定首屏高度范围\n const heightLimit = this.table.tableNoFrameHeight * 5;\n this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);\n this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);\n // this.firstScreenRowLimit = this.bodyBottomRow;\n\n this.rowUpdatePos = this.bodyBottomRow;\n }\n\n async createGroupForFirstScreen(\n cornerHeaderGroup: Group,\n colHeaderGroup: Group,\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number\n ) {\n // compute parameters\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute colums width in first screen\n this.table.internalProps._colWidthsMap.clear();\n this.table._clearColRangeWidthsMap();\n computeColsWidth(this.table, 0, Math.min(this.firstScreenColLimit, this.table.colCount - 1));\n\n // compute rows height in first screen\n this.table.internalProps._rowHeightsMap.clear();\n this.table._clearRowRangeHeightsMap();\n computeRowsHeight(this.table, 0, Math.min(this.firstScreenRowLimit, this.table.rowCount - 1));\n\n // update colHeaderGroup rowHeaderGroup bodyGroup position\n this.table.scenegraph.colHeaderGroup.setAttribute('x', this.table.getFrozenColsWidth());\n this.table.scenegraph.rowHeaderGroup.setAttribute('y', this.table.getFrozenRowsHeight());\n this.table.scenegraph.bodyGroup.setAttributes({\n x: this.table.getFrozenColsWidth(),\n y: this.table.getFrozenRowsHeight()\n });\n\n // create cornerHeaderGroup\n createColGroup(\n cornerHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n this.table.rowHeaderLevelCount - 1, // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'cornerHeader', // CellType\n this.table\n );\n\n // create colHeaderGroup\n createColGroup(\n colHeaderGroup,\n xOrigin,\n yOrigin,\n this.table.rowHeaderLevelCount, // colStart\n Math.min(this.firstScreenColLimit, this.table.colCount - 1), // colEnd\n 0, // rowStart\n this.table.columnHeaderLevelCount - 1, // rowEnd\n 'columnHeader', // isHeader\n this.table\n );\n\n // create rowHeaderGroup\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n this.table.rowHeaderLevelCount - 1, // colEnd\n this.table.columnHeaderLevelCount, // rowStart\n Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), // rowEnd\n 'rowHeader', // isHeader\n this.table\n );\n\n // create bodyGroup\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n this.table.rowHeaderLevelCount, // colStart\n Math.min(this.firstScreenColLimit, this.table.colCount - 1), // colEnd\n this.table.columnHeaderLevelCount, // rowStart\n Math.min(this.firstScreenRowLimit, this.table.rowCount - 1), // rowEnd\n 'body', // isHeader\n this.table\n );\n\n // update progress information\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2);\n\n this.currentCol = this.totalCol;\n this.colEnd = this.currentCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((this.rowEnd - this.rowStart) / 2);\n\n this.currentCol = (bodyGroup.lastChild as Group)?.col ?? this.totalCol;\n this.colEnd = this.currentCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((this.colEnd - this.colStart) / 2);\n\n // 开始异步任务\n await this.progress();\n }\n }\n\n async createColGroupForFirstScreen(\n rowHeaderGroup: Group,\n bodyGroup: Group,\n xOrigin: number,\n yOrigin: number,\n table: BaseTableAPI\n ) {\n this.setParamsForRow();\n this.setParamsForColumn();\n\n // compute row height in first screen\n computeRowsHeight(table, this.table.columnHeaderLevelCount, Math.min(this.firstScreenRowLimit, table.rowCount - 1));\n\n // 生成首屏单元格\n // rowHeader\n createColGroup(\n rowHeaderGroup,\n xOrigin,\n yOrigin,\n 0, // colStart\n table.rowHeaderLevelCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'rowHeader', // isHeader\n table,\n this.firstScreenRowLimit\n );\n // body\n createColGroup(\n bodyGroup,\n xOrigin,\n yOrigin,\n table.rowHeaderLevelCount, // colStart\n table.colCount - 1, // colEnd\n table.columnHeaderLevelCount, // rowStart\n table.rowCount - 1, // rowEnd\n 'body', // isHeader\n table,\n this.firstScreenRowLimit\n );\n\n // 更新row信息\n if (!bodyGroup.firstChild) {\n // 无数据\n this.currentRow = this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n } else {\n this.currentRow = (bodyGroup.firstChild as Group)?.rowNumber ?? this.totalRow;\n this.rowEnd = this.currentRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = Math.floor((this.rowEnd - this.rowStart) / 2);\n // 开始异步任务\n await this.progress();\n }\n }\n\n // async progress() {\n // if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // // 先更新\n // await this.updateCellGroupsAsync();\n // await this.progress();\n // } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // // 先更新没有需要更新的节点,在生成新节点\n // await this.createRow();\n // await this.progress();\n // }\n // }\n async progress() {\n return new Promise<void>((resolve, reject) => {\n setTimeout(async () => {\n if (this.colUpdatePos < this.colEnd) {\n await this.updateColCellGroupsAsync();\n await this.progress();\n } else if (this.rowUpdatePos < this.rowEnd) {\n // console.log('progress rowUpdatePos', this.rowUpdatePos);\n // 先更新\n await this.updateRowCellGroupsAsync();\n await this.progress();\n } else if (this.currentCol < this.totalCol) {\n await this.createCol();\n await this.progress();\n } else if (this.currentRow < this.totalRow) {\n // console.log('progress currentRow', this.currentRow);\n // 先更新没有需要更新的节点,在生成新节点\n await this.createRow();\n await this.progress();\n }\n resolve();\n }, 0);\n });\n }\n\n async createRow() {\n if (!this.taskRowCount) {\n return;\n }\n console.log('createRow', this.currentRow, this.currentRow + this.taskRowCount);\n this.createRowCellGroup(this.taskRowCount);\n }\n\n async createCol() {\n if (!this.taskColCount) {\n return;\n }\n console.log('createCol', this.currentCol, this.currentCol + this.taskColCount);\n this.createColGroup(this.taskRowCount);\n }\n\n createRowCellGroup(onceCount: number) {\n const endRow = Math.min(this.totalRow, this.currentRow + onceCount);\n // compute rows height\n computeRowsHeight(this.table, this.currentRow + 1, endRow);\n\n // create row cellGroup\n let maxHeight = 0;\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n const cellType = col < this.table.rowHeaderLevelCount ? 'rowHeader' : 'body';\n const { height } = createComplexColumn(\n colGroup,\n col,\n colGroup.attribute.width,\n this.currentRow + 1,\n endRow,\n this.table.scenegraph.mergeMap,\n this.table.internalProps.defaultRowHeight,\n this.table,\n cellType\n );\n maxHeight = Math.max(maxHeight, height);\n }\n this.table.scenegraph.bodyGroup.setAttribute('height', maxHeight);\n\n this.currentRow = endRow;\n this.rowEnd = endRow;\n this.rowUpdatePos = this.rowEnd;\n this.referenceRow = this.rowStart + Math.floor((endRow - this.rowStart) / 2);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n createColGroup(onceCount: number) {\n // compute rows height\n const endCol = Math.min(this.totalCol, this.currentCol + onceCount);\n computeColsWidth(this.table, this.currentCol + 1, endCol);\n\n // create colGroup\n const lastColumnGroup = (\n this.table.scenegraph.bodyGroup.lastChild instanceof Group\n ? this.table.scenegraph.bodyGroup.lastChild\n : this.table.scenegraph.bodyGroup.lastChild._prev\n ) as Group;\n const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;\n const yOrigin = lastColumnGroup.attribute.y;\n // create bodyGroup\n createColGroup(\n this.table.scenegraph.bodyGroup,\n xOrigin,\n yOrigin,\n this.currentCol + 1, // colStart\n endCol, // colEnd\n this.rowStart, // rowStart\n this.rowEnd, // rowEnd\n 'body', // isHeader\n this.table\n );\n\n this.currentCol = endCol;\n this.colEnd = endCol;\n this.colUpdatePos = this.colEnd;\n this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);\n console.log('async', this.referenceCol, this.colStart, this.colEnd);\n\n // update container group size and border\n this.table.scenegraph.updateContainer();\n this.table.scenegraph.updateBorderSizeAndPosition();\n }\n\n async setY(y: number) {\n if (y < this.yLimitTop && this.rowStart === this.bodyTopRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else if (y > this.yLimitBottom && this.rowEnd === this.bodyBottomRow) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n } else {\n // 执行动态更新节点\n this.dynamicSetY(y);\n }\n }\n\n async setX(x: number) {\n if (x < this.xLimitLeft && this.colStart === this.bodyLeftCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else if (x > this.xLimitRight && this.colEnd === this.bodyRightCol) {\n // 执行真实body group坐标修改\n this.table.scenegraph.setBodyAndColHeaderX(-x);\n } else {\n // 执行动态更新节点\n this.dynamicSetX(x);\n }\n }\n\n async dynamicSetY(y: number) {\n dynamicSetY(y, this);\n }\n async dynamicSetX(x: number) {\n dynamicSetX(x, this);\n }\n\n updateBody(y: number) {\n this.table.scenegraph.setBodyAndRowHeaderY(-y);\n }\n\n async updateRowCellGroupsAsync() {\n this.updateCellGroups(this.taskRowCount);\n }\n\n updateCellGroups(count: number) {\n const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);\n // console.log('updateCellGroups', this.rowUpdatePos, distRow);\n if (this.table.internalProps.autoRowHeight) {\n computeRowsHeight(this.table, this.rowUpdatePos, distRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowUpdatePos; row <= distRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n\n if (this.table.internalProps.autoRowHeight) {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n this.rowUpdatePos, // rowStart\n distRow, // rowEnd\n this.table,\n this.rowUpdateDirection\n );\n }\n\n this.rowUpdatePos = distRow + 1;\n }\n\n async updateColCellGroupsAsync() {\n this.updateColGroups(this.taskRowCount);\n }\n\n updateColGroups(count: number) {\n const distCol = Math.min(this.bodyRightCol, this.colUpdatePos + count);\n // console.log('updateCellGroups', this.colUpdatePos, distCol);\n for (let col = this.colUpdatePos; col <= distCol; col++) {\n const colGroup = this.table.scenegraph.getColGroup(col);\n if (colGroup) {\n // colGroup.forEachChildren((cellGroup: Group) => {\n // this.updateCellGroupContent(cellGroup);\n // });\n // for (let row = (colGroup.firstChild as Group).row; row <= (colGroup.lastChild as Group).row; row++) {\n // const cellGroup = this.highPerformanceGetCell(colGroup.col, row);\n // this.updateCellGroupContent(cellGroup);\n // }\n let cellGroup = colGroup.firstChild;\n while (cellGroup) {\n // this.updateCellGroupContent(cellGroup as Group);\n // cellGroup = cellGroup._next;\n const newCellGroup = this.updateCellGroupContent(cellGroup as Group);\n cellGroup = newCellGroup._next;\n }\n colGroup.needUpdate = false;\n }\n }\n this.colUpdatePos = distCol + 1;\n }\n\n updateCellGroupPosition(cellGroup: Group, newRow: number, y: number) {\n // 更新位置&row\n cellGroup.row = newRow;\n cellGroup.setAttribute('y', y);\n (cellGroup as any).needUpdate = true;\n (cellGroup as any).needUpdateForAutoRowHeight = true;\n }\n\n updateCellGroupContent(cellGroup: Group) {\n if (!cellGroup.needUpdate) {\n return cellGroup;\n }\n\n const newCellGroup = this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);\n // 更新内容\n // const textMark = cellGroup.firstChild as WrapText;\n // const autoWrapText = Array.isArray(textMark.attribute.text);\n // const textStr: string = this.table.getCellValue(cellGroup.col, cellGroup.row);\n // let text;\n // if (autoWrapText) {\n // text = String(textStr).replace(/\\r?\\n/g, '\\n').replace(/\\r/g, '\\n').split('\\n');\n // } else {\n // text = textStr;\n // }\n\n // textMark.setAttribute('text', text);\n\n cellGroup.needUpdate = false;\n return newCellGroup || cellGroup;\n }\n\n async sortCell() {\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = this.rowStart; row <= this.rowEnd; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n cellGroup.needUpdate = true;\n }\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (this.table.internalProps.autoRowHeight) {\n syncTopRow = this.rowStart;\n syncBottomRow = this.rowEnd;\n } else {\n syncTopRow = Math.max(this.bodyTopRow, this.screenTopRow - this.screenRowCount * 2);\n syncBottomRow = Math.min(this.bodyBottomRow, this.screenTopRow + this.screenRowCount * 3);\n }\n console.log('sort更新同步范围', syncTopRow, syncBottomRow);\n if (this.table.internalProps.autoRowHeight) {\n computeRowsHeight(this.table, syncTopRow, syncBottomRow);\n }\n for (let col = this.bodyLeftCol; col <= this.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = this.table.scenegraph.getCell(col, row);\n const cellGroup = this.highPerformanceGetCell(col, row);\n this.updateCellGroupContent(cellGroup);\n }\n }\n console.log('updateAutoRow', this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up');\n if (this.table.internalProps.autoRowHeight) {\n updateAutoRow(\n this.bodyLeftCol, // colStart\n this.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n this.table,\n this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n this.rowUpdatePos = this.rowStart;\n this.rowUpdateDirection = this.rowEnd > this.bodyBottomRow - (this.rowEnd - this.rowStart + 1) ? 'down' : 'up';\n\n if (\n this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow &&\n this.rowStart === this.table.scenegraph.proxy.bodyTopRow\n ) {\n // 全量更新,do nothing\n } else if (this.rowEnd === this.table.scenegraph.proxy.bodyBottomRow) {\n const totalHeight = this.table.getAllRowsHeight();\n const top = totalHeight - this.table.scenegraph.height;\n this.updateBody(top);\n } else if (this.rowStart === this.table.scenegraph.proxy.bodyTopRow) {\n this.updateBody(0);\n }\n\n if (!this.table.internalProps.autoRowHeight) {\n await this.progress();\n }\n }\n\n highPerformanceGetCell(\n col: number,\n row: number,\n rowStart: number = this.rowStart,\n rowEnd: number = this.rowEnd,\n getShadow?: boolean\n ) {\n if (row < rowStart || row > rowEnd) {\n return emptyGroup;\n }\n if (row < this.rowStart || row > this.rowEnd || col < this.colStart || col > this.colEnd) {\n return emptyGroup;\n }\n if (this.cellCache.get(col)) {\n const cacheCellGoup = this.cellCache.get(col);\n if ((cacheCellGoup._next || cacheCellGoup._prev) && Math.abs(cacheCellGoup.row - row) < row) {\n // 由缓存单元格向前后查找要快于从头查找\n let cellGroup = getCellByCache(cacheCellGoup, row);\n if (!cellGroup) {\n cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n }\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n const cellGroup = this.table.scenegraph.getCell(col, row, getShadow);\n cellGroup.row && this.cellCache.set(col, cellGroup);\n return cellGroup;\n }\n}\n\nfunction getCellByCache(cacheCellGroup: Group, row: number): Group | null {\n if (!cacheCellGroup) {\n return null;\n }\n if (cacheCellGroup.row === row) {\n return cacheCellGroup;\n } else if (cacheCellGroup.row > row) {\n return getCellByCache(cacheCellGroup._prev as Group, row);\n }\n return getCellByCache(cacheCellGroup._next as Group, row);\n}\n"]}
|
|
@@ -58,12 +58,12 @@ function moveCell(count, direction, screenTopRow, proxy) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
const distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count, distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1, syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount);
|
|
61
|
-
|
|
61
|
+
proxy.table.internalProps.autoRowHeight && computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
|
|
62
62
|
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
63
63
|
const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
64
64
|
proxy.updateCellGroupContent(cellGroup);
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
proxy.table.internalProps.autoRowHeight && updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, direction),
|
|
67
67
|
proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
|
|
68
68
|
proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count,
|
|
69
69
|
proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
|
|
@@ -81,22 +81,22 @@ function moveCell(count, direction, screenTopRow, proxy) {
|
|
|
81
81
|
}));
|
|
82
82
|
}
|
|
83
83
|
let syncTopRow, syncBottomRow;
|
|
84
|
-
|
|
84
|
+
proxy.table.internalProps.autoRowHeight ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount),
|
|
85
85
|
syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount)),
|
|
86
|
-
console.log("更新同步范围", syncTopRow, syncBottomRow),
|
|
86
|
+
console.log("更新同步范围", syncTopRow, syncBottomRow), proxy.table.internalProps.autoRowHeight && computeRowsHeight(proxy.table, syncTopRow, syncBottomRow),
|
|
87
87
|
proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
|
|
88
88
|
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) for (let row = syncTopRow; row <= syncBottomRow; row++) {
|
|
89
89
|
const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);
|
|
90
90
|
proxy.updateCellGroupContent(cellGroup);
|
|
91
91
|
}
|
|
92
92
|
console.log("updateAutoRow", distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
|
|
93
|
-
|
|
93
|
+
proxy.table.internalProps.autoRowHeight && updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"),
|
|
94
94
|
proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count,
|
|
95
95
|
proxy.totalRow = "up" === direction ? proxy.totalRow + count : proxy.totalRow - count,
|
|
96
96
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2),
|
|
97
97
|
proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up",
|
|
98
98
|
console.log("move total end proxy", proxy.rowStart, proxy.rowEnd), console.log("move total end cell", proxy.table.scenegraph.bodyGroup.firstChild.firstChild.row, proxy.table.scenegraph.bodyGroup.firstChild.lastChild.row),
|
|
99
|
-
proxy.table.scenegraph.updateNextFrame(),
|
|
99
|
+
proxy.table.scenegraph.updateNextFrame(), proxy.table.internalProps.autoRowHeight || (yield proxy.progress());
|
|
100
100
|
}
|
|
101
101
|
}));
|
|
102
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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AAC,aAAa,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;YAClH,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;YAClE,OAAO,CAAC,GAAG,CACT,qBAAqB,EACpB,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAClE,KAAK,CAAC,KAAa,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,CACnE,CAAC;YAEF,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YACzC,IAAI,KAAK,CAAC,KAAK,CAAC,UAAU,KAAK,YAAY,EAAE;gBAC3C,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CAAA","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n }\n }\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + (cellGroup._prev as Group).attribute.height\n );\n });\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.heightMode === 'autoHeight') {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.heightMode === 'autoHeight') {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.heightMode === 'autoHeight') {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (proxy.table.heightMode !== 'autoHeight') {\n await proxy.progress();\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["scenegraph/group-creater/progress/update-position/dynamic-set-y.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,UAAgB,WAAW,CAAC,CAAS,EAAE,KAAiB;;QAG5D,MAAM,SAAS,GAAI,KAAK,CAAC,KAAa,CAAC,cAAc,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClH,IAAI,CAAC,SAAS,EAAE;YACd,OAAO;SACR;QACD,MAAM,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACnD,IAAI,QAAQ,GAAG,CAAC,EA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,CAAC,QAAQ,EAAE,CAAC;aACxB;SACF;IACH,CAAC;CAAA","file":"dynamic-set-y.js","sourcesContent":["import type { Group } from '../../../graphic/group';\nimport { computeRowsHeight } from '../../../layout/compute-row-height';\nimport type { SceneProxy } from '../proxy';\nimport { updateAutoRow } from './update-auto-row';\n\nexport async function dynamicSetY(y: number, proxy: SceneProxy) {\n // 计算变动row range\n // const screenTopRow = proxy.table.getRowAt(y).row;\n const screenTop = (proxy.table as any).getTargetRowAt(y + proxy.table.scenegraph.colHeaderGroup.attribute.height);\n if (!screenTop) {\n return;\n }\n const screenTopRow = screenTop.row;\n proxy.screenTopRow = screenTopRow;\n const deltaRow = screenTopRow - proxy.referenceRow;\n if (deltaRow > 0) {\n // 向下滚动,顶部cell group移到底部\n moveCell(deltaRow, 'up', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowEnd === proxy.table.scenegraph.proxy.bodyBottomRow) {\n // const totalHeight = proxy.table.getAllRowsHeight();\n // const top = totalHeight - proxy.table.scenegraph.height;\n // proxy.updateBody(top);\n // } else {\n // proxy.updateBody(y);\n // }\n } else if (deltaRow < 0) {\n // 向上滚动,底部cell group移到顶部\n moveCell(-deltaRow, 'down', screenTopRow, proxy);\n proxy.updateBody(y);\n // if (proxy.rowStart === proxy.bodyTopRow) {\n // proxy.updateBody(0);\n // } else {\n // proxy.updateBody(y);\n // }\n } else {\n // 不改变row,更新body group范围\n proxy.updateBody(y);\n }\n\n proxy.table.scenegraph.updateNextFrame();\n}\n\nasync function moveCell(count: number, direction: 'up' | 'down', screenTopRow: number, proxy: SceneProxy) {\n // 限制count范围\n if (direction === 'up' && proxy.rowEnd + count > proxy.bodyBottomRow) {\n count = proxy.bodyBottomRow - proxy.rowEnd;\n } else if (direction === 'down' && proxy.rowStart - count < proxy.bodyTopRow) {\n count = proxy.rowStart - proxy.bodyTopRow;\n }\n\n // 两种更新模式\n // 1. count < rowEnd - rowStart:从顶/底部移动count数量的单元格到底/顶部\n // 2. count >= rowEnd - rowStart:整体移动到目标位置\n if (count < proxy.rowEnd - proxy.rowStart) {\n // 计算更新区域\n const startRow = direction === 'up' ? proxy.rowStart : proxy.rowEnd - count + 1;\n const endRow = direction === 'up' ? proxy.rowStart + count - 1 : proxy.rowEnd;\n // console.log('move', startRow, endRow, direction);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n for (let row = startRow; row <= endRow; row++) {\n if (direction === 'up') {\n const cellGroup = colGroup.firstChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.lastChild as Group).row + 1,\n (colGroup.lastChild as Group).attribute.y + (colGroup.lastChild as Group).attribute.height\n );\n colGroup.appendChild(cellGroup);\n } else {\n const cellGroup = colGroup.lastChild as Group;\n proxy.updateCellGroupPosition(\n cellGroup,\n (colGroup.firstChild as Group).row - 1,\n (colGroup.firstChild as Group).attribute.y - cellGroup.attribute.height\n );\n colGroup.insertBefore(cellGroup, colGroup.firstChild);\n }\n }\n }\n const distStartRow = direction === 'up' ? proxy.rowEnd + 1 : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowStart - 1;\n\n // 更新同步范围\n const syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n const syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n if (proxy.table.internalProps.autoRowHeight) {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n if (proxy.table.internalProps.autoRowHeight) {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n direction\n );\n }\n\n proxy.rowStart = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n proxy.rowEnd = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = distStartRow;\n proxy.rowUpdateDirection = direction;\n console.log('move end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n await proxy.progress();\n } else {\n const distStartRow = direction === 'up' ? proxy.rowStart + count : proxy.rowStart - count;\n const distEndRow = direction === 'up' ? proxy.rowEnd + count : proxy.rowEnd - count;\n const distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n const colGroup = proxy.table.scenegraph.getColGroup(col);\n colGroup?.forEachChildren((cellGroup: Group, index) => {\n // 这里使用colGroup变量而不是for proxy.rowStart to proxy.rowEndproxy.rowEnd是因为在更新内可能出现row号码重复的情况\n proxy.updateCellGroupPosition(\n cellGroup,\n direction === 'up' ? cellGroup.row + count : cellGroup.row - count,\n index === 0 // row === proxy.rowStart\n ? distStartRowY\n : (cellGroup._prev as Group).attribute.y + (cellGroup._prev as Group).attribute.height\n );\n });\n }\n\n // 更新同步范围\n let syncTopRow;\n let syncBottomRow;\n if (proxy.table.internalProps.autoRowHeight) {\n syncTopRow = distStartRow;\n syncBottomRow = distEndRow;\n } else {\n syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - proxy.screenRowCount * 1);\n syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + proxy.screenRowCount * 2);\n }\n console.log('更新同步范围', syncTopRow, syncBottomRow);\n if (proxy.table.internalProps.autoRowHeight) {\n computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);\n }\n proxy.rowStart = distStartRow;\n proxy.rowEnd = distEndRow;\n for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {\n for (let row = syncTopRow; row <= syncBottomRow; row++) {\n // const cellGroup = proxy.table.scenegraph.getCell(col, row);\n const cellGroup = proxy.highPerformanceGetCell(col, row, distStartRow, distEndRow);\n proxy.updateCellGroupContent(cellGroup);\n }\n }\n console.log(\n 'updateAutoRow',\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up'\n );\n\n if (proxy.table.internalProps.autoRowHeight) {\n updateAutoRow(\n proxy.bodyLeftCol, // colStart\n proxy.bodyRightCol, // colEnd\n syncTopRow, // rowStart\n syncBottomRow, // rowEnd\n proxy.table,\n distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up' // 跳转到底部时,从下向上对齐\n );\n }\n\n proxy.currentRow = direction === 'up' ? proxy.currentRow + count : proxy.currentRow - count;\n proxy.totalRow = direction === 'up' ? proxy.totalRow + count : proxy.totalRow - count;\n proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);\n proxy.rowUpdatePos = proxy.rowStart;\n proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? 'down' : 'up';\n console.log('move total end proxy', proxy.rowStart, proxy.rowEnd);\n console.log(\n 'move total end cell',\n (proxy.table as any).scenegraph.bodyGroup.firstChild.firstChild.row,\n (proxy.table as any).scenegraph.bodyGroup.firstChild.lastChild.row\n );\n\n proxy.table.scenegraph.updateNextFrame();\n if (!proxy.table.internalProps.autoRowHeight) {\n await proxy.progress();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { dealWithCustom } from "../component/custom";
|
|
2
|
+
|
|
3
|
+
import { getCellMergeInfo } from "../utils/get-cell-merge";
|
|
4
|
+
|
|
5
|
+
import { getQuadProps } from "../utils/padding";
|
|
6
|
+
|
|
7
|
+
import { updateCellContentWidth } from "../utils/text-icon-layout";
|
|
8
|
+
|
|
9
|
+
export function updateAutoColWidth(scene) {
|
|
10
|
+
var _a;
|
|
11
|
+
const mergeCells = [], {layoutMap: layoutMap} = scene.table.internalProps;
|
|
12
|
+
for (let col = 0; col < scene.table.colCount; col++) {
|
|
13
|
+
let columnMaxWidth = 0;
|
|
14
|
+
const column = (null === (_a = layoutMap.columnWidths) || void 0 === _a ? void 0 : _a[col]) || {
|
|
15
|
+
width: "auto"
|
|
16
|
+
};
|
|
17
|
+
if ("auto" === column.width || scene.transpose || "autoWidth" === scene.table.widthMode && !column.width) {
|
|
18
|
+
const colHeaderColumn = scene.getColGroup(col, !0);
|
|
19
|
+
colHeaderColumn && colHeaderColumn.forEachChildren(((cell, row) => {
|
|
20
|
+
const mergeInfo = getCellMergeInfo(scene.table, col, row);
|
|
21
|
+
if (mergeInfo) {
|
|
22
|
+
const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);
|
|
23
|
+
columnMaxWidth = Math.max(columnMaxWidth, mergeCell.attribute.width / (mergeInfo.end.col - mergeInfo.start.col + 1));
|
|
24
|
+
} else columnMaxWidth = Math.max(columnMaxWidth, cell.attribute.width);
|
|
25
|
+
}));
|
|
26
|
+
const rowHeaderOrBodyColumn = scene.getColGroup(col);
|
|
27
|
+
if (rowHeaderOrBodyColumn.forEachChildren((cell => {
|
|
28
|
+
const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);
|
|
29
|
+
if (mergeInfo) {
|
|
30
|
+
const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);
|
|
31
|
+
columnMaxWidth = Math.max(columnMaxWidth, mergeCell.attribute.width / (mergeInfo.end.col - mergeInfo.start.col + 1));
|
|
32
|
+
} else columnMaxWidth = Math.max(columnMaxWidth, cell.attribute.width);
|
|
33
|
+
})), colHeaderColumn) {
|
|
34
|
+
const colHeaderColumnDetaWidth = colHeaderColumn.attribute.width - columnMaxWidth;
|
|
35
|
+
colHeaderColumnDetaWidth && (colHeaderColumn.setAttribute("width", columnMaxWidth),
|
|
36
|
+
colHeaderColumn.parent.forEachChildren((column => {
|
|
37
|
+
column.col > col && column.setAttribute("x", column.attribute.x - colHeaderColumnDetaWidth);
|
|
38
|
+
}))), colHeaderColumn.setAttribute("width", columnMaxWidth), colHeaderColumn.forEachChildren(((cell, row) => {
|
|
39
|
+
const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);
|
|
40
|
+
mergeInfo && mergeInfo.start.col !== mergeInfo.end.col ? mergeCells.push(mergeInfo) : "shadow-cell" !== cell.role && updateCell(cell, columnMaxWidth, scene);
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
const rowHeaderOrBodyColumnDetaWidth = rowHeaderOrBodyColumn.attribute.width - columnMaxWidth;
|
|
44
|
+
rowHeaderOrBodyColumnDetaWidth && (rowHeaderOrBodyColumn.setAttribute("width", columnMaxWidth),
|
|
45
|
+
rowHeaderOrBodyColumn.parent.forEachChildren((column => {
|
|
46
|
+
column.col > col && column.setAttribute("x", column.attribute.x - rowHeaderOrBodyColumnDetaWidth);
|
|
47
|
+
}))), rowHeaderOrBodyColumn.setAttribute("width", columnMaxWidth), rowHeaderOrBodyColumn.forEachChildren(((cell, row) => {
|
|
48
|
+
const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);
|
|
49
|
+
mergeInfo && mergeInfo.start.col !== mergeInfo.end.col ? mergeCells.push(mergeInfo) : "shadow-cell" !== cell.role && updateCell(cell, columnMaxWidth, scene);
|
|
50
|
+
})), scene.table.setColWidth(col, columnMaxWidth, !0);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
for (let i = 0; i < mergeCells.length; i++) {
|
|
54
|
+
const mergeInfo = mergeCells[i], mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);
|
|
55
|
+
let width = 0;
|
|
56
|
+
for (let j = mergeInfo.start.col; j <= mergeInfo.end.col; j++) width += scene.getColGroup(j).attribute.width;
|
|
57
|
+
updateCell(mergeCell, width, scene);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function updateCell(cellGroup, width, scene) {
|
|
62
|
+
const oldWidth = cellGroup.attribute.width;
|
|
63
|
+
cellGroup.setAttribute("width", width);
|
|
64
|
+
const style = scene.table._getCellStyle(cellGroup.col, cellGroup.row);
|
|
65
|
+
updateCellContentWidth(cellGroup, width, width - oldWidth, scene.table.internalProps.autoRowHeight, getQuadProps(style.padding), style.textAlign, style.textBaseline, scene);
|
|
66
|
+
const customContainer = cellGroup.getChildByName("custom-container");
|
|
67
|
+
if (customContainer) {
|
|
68
|
+
let customRender, customLayout;
|
|
69
|
+
customContainer.clear(), cellGroup.removeChild(customContainer);
|
|
70
|
+
if ("body" !== scene.table.getCellType(cellGroup.col, cellGroup.row)) {
|
|
71
|
+
const define = scene.table.getHeaderDefine(cellGroup.col, cellGroup.row);
|
|
72
|
+
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
73
|
+
} else {
|
|
74
|
+
const define = scene.table.getBodyColumnDefine(cellGroup.col, cellGroup.row);
|
|
75
|
+
customRender = (null == define ? void 0 : define.customRender) || scene.table.customRender,
|
|
76
|
+
customLayout = null == define ? void 0 : define.customLayout;
|
|
77
|
+
}
|
|
78
|
+
const customResult = dealWithCustom(customLayout, customRender, cellGroup.col, cellGroup.row, cellGroup.attribute.width, cellGroup.attribute.height, !1, !1, scene.table);
|
|
79
|
+
cellGroup.appendChild(customResult.elementsGroup);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=auto-width.js.map
|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N,MAAM,uBAAN,MAAM,CAAE,kBAAkB,CAAC;YAC1C,YAAY,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,kBAAkB,CAAC;SAC3C;aAAM;YACL,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,SAAS,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7E,YAAY,GAAG,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,KAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC;YAChE,YAAY,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,YAAY,CAAC;SACrC;QACD,MAAM,YAAY,GAAG,cAAc,CACjC,YAAY,EACZ,YAAY,EACZ,SAAS,CAAC,GAAG,EACb,SAAS,CAAC,GAAG,EACb,SAAS,CAAC,SAAS,CAAC,KAAK,EACzB,SAAS,CAAC,SAAS,CAAC,MAAM,EAC1B,KAAK,EACL,KAAK,EACL,KAAK,CAAC,KAAK,CACZ,CAAC;QACF,SAAS,CAAC,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;KACnD;AACH,CAAC","file":"auto-width.js","sourcesContent":["import type { CellRange } from '../../ts-types';\nimport { dealWithCustom } from '../component/custom';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\nimport { getCellMergeInfo } from '../utils/get-cell-merge';\nimport { getQuadProps } from '../utils/padding';\nimport { updateCellContentWidth } from '../utils/text-icon-layout';\n\n/**\n * @description: 场景树节点生成后,处理自动行高\n * @param {Scenegraph} scene\n * @return {*}\n */\nexport function updateAutoColWidth(scene: Scenegraph) {\n const mergeCells: CellRange[] = [];\n\n const { layoutMap } = scene.table.internalProps;\n // const { width: defineWidth } = layoutMap.columnWidths?.[col] || {};\n // layoutMap.columnWidths.forEach((column: any, index: number) => {\n for (let col = 0; col < scene.table.colCount; col++) {\n let columnMaxWidth = 0;\n const column = layoutMap.columnWidths?.[col] || { width: 'auto' };\n if (column.width === 'auto' || scene.transpose || (scene.table.widthMode === 'autoWidth' && !column.width)) {\n // 找到colHeader index列最大宽度\n const colHeaderColumn = scene.getColGroup(col, true) as Group;\n if (colHeaderColumn) {\n colHeaderColumn.forEachChildren((cell: Group, row: number) => {\n // 处理Merge情况,宽度度均分\n const mergeInfo = getCellMergeInfo(scene.table, col, row);\n if (mergeInfo) {\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n columnMaxWidth = Math.max(\n columnMaxWidth,\n mergeCell.attribute.width / (mergeInfo.end.col - mergeInfo.start.col + 1)\n );\n } else {\n columnMaxWidth = Math.max(columnMaxWidth, cell.attribute.width);\n }\n });\n }\n\n const rowHeaderOrBodyColumn: Group = scene.getColGroup(col);\n rowHeaderOrBodyColumn.forEachChildren((cell: Group) => {\n // columnMaxWidth = Math.max(columnMaxWidth, cell.attribute.width);\n // 处理Merge情况,宽度度均分\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo) {\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n columnMaxWidth = Math.max(\n columnMaxWidth,\n mergeCell.attribute.width / (mergeInfo.end.col - mergeInfo.start.col + 1)\n );\n } else {\n columnMaxWidth = Math.max(columnMaxWidth, cell.attribute.width);\n }\n });\n\n // 更新列宽与后续列位置\n if (colHeaderColumn) {\n const colHeaderColumnDetaWidth = colHeaderColumn.attribute.width - columnMaxWidth;\n if (colHeaderColumnDetaWidth) {\n colHeaderColumn.setAttribute('width', columnMaxWidth);\n colHeaderColumn.parent.forEachChildren((column: Group) => {\n const columnCol = column.col;\n if (columnCol > col) {\n column.setAttribute('x', column.attribute.x - colHeaderColumnDetaWidth);\n }\n });\n }\n // 更新最大列宽到column theme\n colHeaderColumn.setAttribute('width', columnMaxWidth);\n\n // 更新最大列宽到column cell\n colHeaderColumn.forEachChildren((cell: Group, row: number) => {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.start.col !== mergeInfo.end.col) {\n // 处理Merge情况,跨行Merge单元格宽度最后统一处理\n mergeCells.push(mergeInfo);\n } else if (cell.role !== 'shadow-cell') {\n // cell.setAttribute('width', columnMaxWidth);\n updateCell(cell, columnMaxWidth, scene);\n }\n });\n }\n\n // 更新列宽与后续列位置\n const rowHeaderOrBodyColumnDetaWidth = rowHeaderOrBodyColumn.attribute.width - columnMaxWidth;\n if (rowHeaderOrBodyColumnDetaWidth) {\n rowHeaderOrBodyColumn.setAttribute('width', columnMaxWidth);\n rowHeaderOrBodyColumn.parent.forEachChildren((column: Group) => {\n const columnCol = column.col;\n if (columnCol > col) {\n column.setAttribute('x', column.attribute.x - rowHeaderOrBodyColumnDetaWidth);\n }\n });\n }\n // 更新最大列宽到column theme\n rowHeaderOrBodyColumn.setAttribute('width', columnMaxWidth);\n\n // 更新最大列宽到column cell\n rowHeaderOrBodyColumn.forEachChildren((cell: Group, row: number) => {\n const mergeInfo = getCellMergeInfo(scene.table, cell.col, cell.row);\n if (mergeInfo && mergeInfo.start.col !== mergeInfo.end.col) {\n // 处理Merge情况,跨行Merge单元格宽度最后统一处理\n mergeCells.push(mergeInfo);\n } else if (cell.role !== 'shadow-cell') {\n // cell.setAttribute('width', columnMaxWidth);\n updateCell(cell, columnMaxWidth, scene);\n }\n });\n\n // 更新table map列宽存储\n scene.table.setColWidth(col, columnMaxWidth, true);\n }\n }\n\n // 处理跨行Merge单元格\n for (let i = 0; i < mergeCells.length; i++) {\n const mergeInfo = mergeCells[i];\n const mergeCell = scene.getCell(mergeInfo.start.col, mergeInfo.start.row);\n let width = 0;\n for (let j = mergeInfo.start.col; j <= mergeInfo.end.col; j++) {\n width += scene.getColGroup(j).attribute.width;\n }\n\n updateCell(mergeCell, width, scene);\n }\n}\n\nfunction updateCell(cellGroup: Group, width: number, scene: Scenegraph) {\n const oldWidth = cellGroup.attribute.width;\n cellGroup.setAttribute('width', width);\n\n const style = scene.table._getCellStyle(cellGroup.col, cellGroup.row);\n updateCellContentWidth(\n cellGroup,\n width,\n width - oldWidth,\n scene.table.internalProps.autoRowHeight,\n getQuadProps(style.padding as number),\n style.textAlign,\n style.textBaseline,\n scene\n );\n\n // 处理自定义渲染\n const customContainer = cellGroup.getChildByName('custom-container') as Group;\n if (customContainer) {\n customContainer.clear();\n cellGroup.removeChild(customContainer);\n\n let customRender;\n let customLayout;\n const cellType = scene.table.getCellType(cellGroup.col, cellGroup.row);\n if (cellType !== 'body') {\n const define = scene.table.getHeaderDefine(cellGroup.col, cellGroup.row);\n customRender = define?.headerCustomRender;\n customLayout = define?.headerCustomLayout;\n } else {\n const define = scene.table.getBodyColumnDefine(cellGroup.col, cellGroup.row);\n customRender = define?.customRender || scene.table.customRender;\n customLayout = define?.customLayout;\n }\n const customResult = dealWithCustom(\n customLayout,\n customRender,\n cellGroup.col,\n cellGroup.row,\n cellGroup.attribute.width,\n cellGroup.attribute.height,\n false,\n false,\n scene.table\n );\n cellGroup.appendChild(customResult.elementsGroup);\n }\n}\n"]}
|