@visactor/vtable 0.9.2-alpha.0 → 0.9.2-alpha.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 +2 -1
- package/cjs/ListTable.js +17 -13
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +68 -0
- package/cjs/PivotChart.js +427 -0
- package/cjs/PivotChart.js.map +1 -0
- package/cjs/PivotTable.d.ts +2 -1
- package/cjs/PivotTable.js +18 -13
- 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 +0 -1
- package/cjs/body-helper/style/Style.js +25 -28
- package/cjs/body-helper/style/Style.js.map +1 -1
- package/cjs/components/axis/axis.d.ts +45 -0
- package/cjs/components/axis/axis.js +146 -0
- package/cjs/components/axis/axis.js.map +1 -0
- package/cjs/components/axis/band-scale.d.ts +18 -0
- package/cjs/components/axis/band-scale.js +54 -0
- package/cjs/components/axis/band-scale.js.map +1 -0
- package/cjs/components/axis/get-axis-attributes.d.ts +136 -0
- package/cjs/components/axis/get-axis-attributes.js +169 -0
- package/cjs/components/axis/get-axis-attributes.js.map +1 -0
- package/cjs/components/axis/label-overlap.d.ts +3 -0
- package/cjs/components/axis/label-overlap.js +46 -0
- package/cjs/components/axis/label-overlap.js.map +1 -0
- package/cjs/components/axis/linear-scale.d.ts +45 -0
- package/cjs/components/axis/linear-scale.js +120 -0
- package/cjs/components/axis/linear-scale.js.map +1 -0
- package/cjs/components/legend/get-legend-attributes.d.ts +5 -0
- package/cjs/components/legend/get-legend-attributes.js +90 -0
- package/cjs/components/legend/get-legend-attributes.js.map +1 -0
- package/cjs/components/legend/legend.d.ts +23 -0
- package/cjs/components/legend/legend.js +94 -0
- package/cjs/components/legend/legend.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/BaseMenu.d.ts +2 -2
- package/cjs/components/menu/dom/BaseMenu.js.map +1 -0
- package/cjs/components/menu/dom/Menu.js.map +1 -0
- package/{es → cjs/components}/menu/dom/MenuHandler.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/MenuHandler.js +1 -1
- package/cjs/components/menu/dom/MenuHandler.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuContainer.js +2 -2
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/cjs/{menu → components/menu}/dom/logic/MenuElement.js +4 -4
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/cjs/components/title/title.d.ts +12 -0
- package/cjs/components/title/title.js +66 -0
- package/cjs/components/title/title.js.map +1 -0
- package/cjs/{tooltip → components/tooltip}/BaseTooltip.d.ts +3 -3
- package/cjs/components/tooltip/BaseTooltip.js.map +1 -0
- package/cjs/components/tooltip/Tooltip.js.map +1 -0
- package/{es → cjs/components}/tooltip/TooltipHandler.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/TooltipHandler.js +1 -1
- package/cjs/components/tooltip/TooltipHandler.js.map +1 -0
- package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.d.ts +4 -4
- package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/cjs/components/util/orient.d.ts +3 -0
- package/cjs/components/util/orient.js +14 -0
- package/cjs/components/util/orient.js.map +1 -0
- package/cjs/components/util/register.d.ts +3 -0
- package/cjs/components/util/register.js +15 -0
- package/cjs/components/util/register.js.map +1 -0
- package/cjs/components/util/tick-data/config.d.ts +1 -0
- package/cjs/components/util/tick-data/config.js +6 -0
- package/cjs/components/util/tick-data/config.js.map +1 -0
- package/cjs/components/util/tick-data/continuous.d.ts +2 -0
- package/cjs/components/util/tick-data/continuous.js +39 -0
- package/cjs/components/util/tick-data/continuous.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/linear.js +66 -0
- package/cjs/components/util/tick-data/discrete/linear.js.map +1 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js +46 -0
- package/cjs/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/cjs/components/util/tick-data/index.d.ts +2 -0
- package/cjs/components/util/tick-data/index.js +17 -0
- package/cjs/components/util/tick-data/index.js.map +1 -0
- package/cjs/components/util/tick-data/util.d.ts +21 -0
- package/cjs/components/util/tick-data/util.js +115 -0
- package/cjs/components/util/tick-data/util.js.map +1 -0
- package/cjs/components/util/transform.d.ts +5 -0
- package/cjs/components/util/transform.js +45 -0
- package/cjs/components/util/transform.js.map +1 -0
- package/cjs/core/BaseTable.d.ts +18 -5
- package/cjs/core/BaseTable.js +99 -39
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +4 -1
- 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 +1 -2
- package/cjs/data/CachedDataSource.js +2 -1
- package/cjs/data/DataSource.js +2 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +12 -19
- package/cjs/dataset/dataset.js +168 -196
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/dataset/statistics-helper.d.ts +68 -0
- package/cjs/dataset/statistics-helper.js +173 -0
- package/cjs/dataset/statistics-helper.js.map +1 -0
- package/cjs/dataset/util/zero-align.d.ts +10 -0
- package/cjs/dataset/util/zero-align.js +119 -0
- package/cjs/dataset/util/zero-align.js.map +1 -0
- 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/VChartEventProxy.d.ts +1 -0
- package/cjs/event/VChartEventProxy.js +1 -0
- package/cjs/event/VChartEventProxy.js.map +1 -0
- package/cjs/event/event.js +7 -4
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -6
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/pivot-chart/axis-click.d.ts +2 -0
- package/cjs/event/pivot-chart/axis-click.js +42 -0
- package/cjs/event/pivot-chart/axis-click.js.map +1 -0
- package/cjs/event/sparkline-event.js.map +1 -1
- package/cjs/event/util.js +0 -1
- 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 +0 -1
- package/cjs/header-helper/style/Style.js +25 -28
- package/cjs/header-helper/style/Style.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +11 -2
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-chart/get-axis-config.d.ts +2 -0
- package/cjs/layout/pivot-chart/get-axis-config.js +118 -0
- package/cjs/layout/pivot-chart/get-axis-config.js.map +1 -0
- package/cjs/layout/pivot-chart/get-chart-spec.d.ts +4 -0
- package/cjs/layout/pivot-chart/get-chart-spec.js +118 -0
- package/cjs/layout/pivot-chart/get-chart-spec.js.map +1 -0
- package/cjs/layout/pivot-header-layout.d.ts +11 -5
- package/cjs/layout/pivot-header-layout.js +42 -12
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.d.ts +53 -8
- package/cjs/layout/pivot-layout.js +393 -89
- package/cjs/layout/pivot-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.d.ts +8 -0
- package/cjs/layout/simple-header-layout.js +34 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- 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 +3 -0
- package/cjs/scenegraph/graphic/chart.js +21 -6
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/chart-render.js +15 -3
- package/cjs/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +8 -3
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- 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/create-group-for-first-screen.d.ts +3 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +71 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +29 -35
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +10 -9
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +23 -15
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +20 -9
- 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 +3 -2
- 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 +3 -0
- package/cjs/scenegraph/refresh-node/update-chart.js +48 -5
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +9 -0
- package/cjs/scenegraph/scenegraph.js +144 -18
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/stick-text/index.js +10 -8
- package/cjs/scenegraph/stick-text/index.js.map +1 -1
- package/cjs/scenegraph/style/frame-border.js +1 -5
- 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 +1 -2
- package/cjs/tools/LimitPromiseQueue.js +2 -1
- package/cjs/tools/calc.d.ts +3 -0
- package/cjs/tools/calc.js +11 -3
- 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/cjs/ts-types/base-table.d.ts +29 -12
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +0 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/component/axis.d.ts +12 -0
- package/cjs/ts-types/component/axis.js +6 -0
- package/cjs/ts-types/component/axis.js.map +1 -0
- package/cjs/ts-types/component/legend.d.ts +5 -0
- package/cjs/ts-types/component/legend.js +6 -0
- package/cjs/ts-types/component/legend.js.map +1 -0
- package/cjs/ts-types/component/title.d.ts +47 -0
- package/cjs/ts-types/component/title.js +6 -0
- package/cjs/ts-types/component/title.js.map +1 -0
- package/cjs/ts-types/component/util.d.ts +1 -0
- package/cjs/ts-types/component/util.js +6 -0
- package/cjs/ts-types/component/util.js.map +1 -0
- package/cjs/ts-types/events.d.ts +100 -83
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +2 -0
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +18 -5
- 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 +4 -0
- package/cjs/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +3 -1
- 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 +1 -0
- 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 +27 -3
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +22782 -11928
- package/dist/vtable.min.js +4 -2
- package/es/ListTable.d.ts +2 -1
- package/es/ListTable.js +17 -13
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +68 -0
- package/es/PivotChart.js +437 -0
- package/es/PivotChart.js.map +1 -0
- package/es/PivotTable.d.ts +2 -1
- package/es/PivotTable.js +19 -14
- 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 +0 -1
- package/es/body-helper/style/Style.js +25 -28
- package/es/body-helper/style/Style.js.map +1 -1
- package/es/components/axis/axis.d.ts +45 -0
- package/es/components/axis/axis.js +155 -0
- package/es/components/axis/axis.js.map +1 -0
- package/es/components/axis/band-scale.d.ts +18 -0
- package/es/components/axis/band-scale.js +46 -0
- package/es/components/axis/band-scale.js.map +1 -0
- package/es/components/axis/get-axis-attributes.d.ts +136 -0
- package/es/components/axis/get-axis-attributes.js +166 -0
- package/es/components/axis/get-axis-attributes.js.map +1 -0
- package/es/components/axis/label-overlap.d.ts +3 -0
- package/es/components/axis/label-overlap.js +39 -0
- package/es/components/axis/label-overlap.js.map +1 -0
- package/es/components/axis/linear-scale.d.ts +45 -0
- package/es/components/axis/linear-scale.js +104 -0
- package/es/components/axis/linear-scale.js.map +1 -0
- package/es/components/legend/get-legend-attributes.d.ts +5 -0
- package/es/components/legend/get-legend-attributes.js +84 -0
- package/es/components/legend/get-legend-attributes.js.map +1 -0
- package/es/components/legend/legend.d.ts +23 -0
- package/es/components/legend/legend.js +93 -0
- package/es/components/legend/legend.js.map +1 -0
- package/es/{menu → components/menu}/dom/BaseMenu.d.ts +2 -2
- package/es/components/menu/dom/BaseMenu.js.map +1 -0
- package/es/components/menu/dom/Menu.js.map +1 -0
- package/{cjs → es/components}/menu/dom/MenuHandler.d.ts +2 -2
- package/es/{menu → components/menu}/dom/MenuHandler.js +2 -2
- package/es/components/menu/dom/MenuHandler.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuContainer.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuContainer.js +4 -4
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -0
- package/es/{menu → components/menu}/dom/logic/MenuElement.d.ts +2 -2
- package/es/{menu → components/menu}/dom/logic/MenuElement.js +9 -9
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -0
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -0
- package/es/components/title/title.d.ts +12 -0
- package/es/components/title/title.js +61 -0
- package/es/components/title/title.js.map +1 -0
- package/es/{tooltip → components/tooltip}/BaseTooltip.d.ts +3 -3
- package/es/components/tooltip/BaseTooltip.js.map +1 -0
- package/es/components/tooltip/Tooltip.js.map +1 -0
- package/{cjs → es/components}/tooltip/TooltipHandler.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/TooltipHandler.js +4 -4
- package/es/components/tooltip/TooltipHandler.js.map +1 -0
- package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.d.ts +4 -4
- package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElement.js +4 -4
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -0
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -0
- package/es/components/util/orient.d.ts +3 -0
- package/es/components/util/orient.js +8 -0
- package/es/components/util/orient.js.map +1 -0
- package/es/components/util/register.d.ts +3 -0
- package/es/components/util/register.js +8 -0
- package/es/components/util/register.js.map +1 -0
- package/es/components/util/tick-data/config.d.ts +1 -0
- package/es/components/util/tick-data/config.js +2 -0
- package/es/components/util/tick-data/config.js.map +1 -0
- package/es/components/util/tick-data/continuous.d.ts +2 -0
- package/es/components/util/tick-data/continuous.js +38 -0
- package/es/components/util/tick-data/continuous.js.map +1 -0
- package/es/components/util/tick-data/discrete/linear.d.ts +2 -0
- package/es/components/util/tick-data/discrete/linear.js +59 -0
- package/es/components/util/tick-data/discrete/linear.js.map +1 -0
- package/es/components/util/tick-data/discrete/polar-angle.d.ts +2 -0
- package/es/components/util/tick-data/discrete/polar-angle.js +39 -0
- package/es/components/util/tick-data/discrete/polar-angle.js.map +1 -0
- package/es/components/util/tick-data/index.d.ts +2 -0
- package/es/components/util/tick-data/index.js +19 -0
- package/es/components/util/tick-data/index.js.map +1 -0
- package/es/components/util/tick-data/util.d.ts +21 -0
- package/es/components/util/tick-data/util.js +104 -0
- package/es/components/util/tick-data/util.js.map +1 -0
- package/es/components/util/transform.d.ts +5 -0
- package/es/components/util/transform.js +34 -0
- package/es/components/util/transform.js.map +1 -0
- package/es/core/BaseTable.d.ts +18 -5
- package/es/core/BaseTable.js +103 -41
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +3 -0
- package/es/core/TABLE_EVENT_TYPE.js +4 -1
- 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 +1 -2
- package/es/data/CachedDataSource.js +2 -1
- package/es/data/DataSource.js +2 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.d.ts +12 -19
- package/es/dataset/dataset.js +161 -187
- package/es/dataset/dataset.js.map +1 -1
- package/es/dataset/statistics-helper.d.ts +68 -0
- package/es/dataset/statistics-helper.js +152 -0
- package/es/dataset/statistics-helper.js.map +1 -0
- package/es/dataset/util/zero-align.d.ts +10 -0
- package/es/dataset/util/zero-align.js +111 -0
- package/es/dataset/util/zero-align.js.map +1 -0
- 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/VChartEventProxy.d.ts +1 -0
- package/es/event/VChartEventProxy.js +1 -0
- package/es/event/VChartEventProxy.js.map +1 -0
- package/es/event/event.js +8 -3
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +8 -6
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/pivot-chart/axis-click.d.ts +2 -0
- package/es/event/pivot-chart/axis-click.js +36 -0
- package/es/event/pivot-chart/axis-click.js.map +1 -0
- package/es/event/sparkline-event.js.map +1 -1
- package/es/event/util.js +1 -2
- 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 +0 -1
- package/es/header-helper/style/Style.js +25 -28
- package/es/header-helper/style/Style.js.map +1 -1
- package/es/index.d.ts +4 -3
- package/es/index.js +4 -2
- package/es/index.js.map +1 -1
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-chart/get-axis-config.d.ts +2 -0
- package/es/layout/pivot-chart/get-axis-config.js +110 -0
- package/es/layout/pivot-chart/get-axis-config.js.map +1 -0
- package/es/layout/pivot-chart/get-chart-spec.d.ts +4 -0
- package/es/layout/pivot-chart/get-chart-spec.js +109 -0
- package/es/layout/pivot-chart/get-chart-spec.js.map +1 -0
- package/es/layout/pivot-header-layout.d.ts +11 -5
- package/es/layout/pivot-header-layout.js +41 -11
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.d.ts +53 -8
- package/es/layout/pivot-layout.js +396 -87
- package/es/layout/pivot-layout.js.map +1 -1
- package/es/layout/simple-header-layout.d.ts +8 -0
- package/es/layout/simple-header-layout.js +34 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- 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 +3 -0
- package/es/scenegraph/graphic/chart.js +22 -5
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/graphic/contributions/chart-render.js +15 -3
- package/es/scenegraph/graphic/contributions/chart-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +9 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -1
- 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/create-group-for-first-screen.d.ts +3 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +65 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -0
- package/es/scenegraph/group-creater/progress/proxy.d.ts +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +27 -34
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +9 -8
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +23 -15
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +20 -9
- 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 +3 -1
- 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 +3 -0
- package/es/scenegraph/refresh-node/update-chart.js +45 -4
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +9 -0
- package/es/scenegraph/scenegraph.js +146 -19
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/stick-text/index.js +10 -8
- package/es/scenegraph/stick-text/index.js.map +1 -1
- package/es/scenegraph/style/frame-border.js +1 -5
- 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 +1 -2
- package/es/tools/LimitPromiseQueue.js +2 -1
- package/es/tools/calc.d.ts +3 -0
- package/es/tools/calc.js +10 -0
- 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/es/ts-types/base-table.d.ts +29 -12
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +0 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/component/axis.d.ts +12 -0
- package/es/ts-types/component/axis.js +2 -0
- package/es/ts-types/component/axis.js.map +1 -0
- package/es/ts-types/component/legend.d.ts +5 -0
- package/es/ts-types/component/legend.js +2 -0
- package/es/ts-types/component/legend.js.map +1 -0
- package/es/ts-types/component/title.d.ts +47 -0
- package/es/ts-types/component/title.js +2 -0
- package/es/ts-types/component/title.js.map +1 -0
- package/es/ts-types/component/util.d.ts +1 -0
- package/es/ts-types/component/util.js +2 -0
- package/es/ts-types/component/util.js.map +1 -0
- package/es/ts-types/events.d.ts +100 -83
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +2 -0
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +18 -5
- 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 +4 -0
- package/es/ts-types/pivot-table/PIVOT_TABLE_EVENT_TYPE.js +4 -0
- 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 +1 -0
- 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 +27 -3
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +11 -5
- package/cjs/menu/dom/BaseMenu.js.map +0 -1
- package/cjs/menu/dom/Menu.js.map +0 -1
- package/cjs/menu/dom/MenuHandler.js.map +0 -1
- package/cjs/menu/dom/logic/MenuContainer.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElement.js.map +0 -1
- package/cjs/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/cjs/scenegraph/layout/auto-width.d.ts +0 -2
- package/cjs/scenegraph/layout/auto-width.js +0 -85
- package/cjs/scenegraph/layout/auto-width.js.map +0 -1
- package/cjs/tooltip/BaseTooltip.js.map +0 -1
- package/cjs/tooltip/Tooltip.js.map +0 -1
- package/cjs/tooltip/TooltipHandler.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/cjs/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- package/es/menu/dom/BaseMenu.js.map +0 -1
- package/es/menu/dom/Menu.js.map +0 -1
- package/es/menu/dom/MenuHandler.js.map +0 -1
- package/es/menu/dom/logic/MenuContainer.js.map +0 -1
- package/es/menu/dom/logic/MenuElement.js.map +0 -1
- package/es/menu/dom/logic/MenuElementStyle.js.map +0 -1
- package/es/scenegraph/layout/auto-width.d.ts +0 -2
- package/es/scenegraph/layout/auto-width.js +0 -82
- package/es/scenegraph/layout/auto-width.js.map +0 -1
- package/es/tooltip/BaseTooltip.js.map +0 -1
- package/es/tooltip/Tooltip.js.map +0 -1
- package/es/tooltip/TooltipHandler.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElement.js.map +0 -1
- package/es/tooltip/logic/BubbleTooltipElementStyle.js.map +0 -1
- /package/cjs/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/Menu.js +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/cjs/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/cjs/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
- /package/es/{menu → components/menu}/dom/BaseMenu.js +0 -0
- /package/es/{menu → components/menu}/dom/Menu.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/Menu.js +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.d.ts +0 -0
- /package/es/{menu → components/menu}/dom/logic/MenuElementStyle.js +0 -0
- /package/es/{tooltip → components/tooltip}/BaseTooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/Tooltip.js +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.d.ts +0 -0
- /package/es/{tooltip → components/tooltip}/logic/BubbleTooltipElementStyle.js +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export function updateChartSize(scenegraph, col) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const columnGroup = scenegraph.getColGroup(c);
|
|
5
|
-
(null === (_a = columnGroup.attribute) || void 0 === _a ? void 0 : _a.chartInstance) && columnGroup.getChildren().forEach((cellNode => {
|
|
2
|
+
for (let c = col; c <= scenegraph.proxy.colEnd; c++) {
|
|
3
|
+
scenegraph.getColGroup(c).getChildren().forEach((cellNode => {
|
|
6
4
|
const width = scenegraph.table.getColWidth(cellNode.col), height = scenegraph.table.getRowHeight(cellNode.row);
|
|
7
5
|
cellNode.children.forEach((node => {
|
|
8
6
|
"chart" === node.type && (node.cacheCanvas = null, node.setAttribute("width", Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])),
|
|
@@ -17,4 +15,47 @@ export function updateChartSize(scenegraph, col) {
|
|
|
17
15
|
}));
|
|
18
16
|
}
|
|
19
17
|
}
|
|
18
|
+
|
|
19
|
+
export function clearChartCacheImage(scenegraph) {
|
|
20
|
+
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
21
|
+
scenegraph.getColGroup(c).getChildren().forEach((cellNode => {
|
|
22
|
+
cellNode.children.forEach((node => {
|
|
23
|
+
"chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
|
|
24
|
+
}));
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function updateChartData(scenegraph) {
|
|
30
|
+
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
31
|
+
scenegraph.getColGroup(c).getChildren().forEach((cellNode => {
|
|
32
|
+
const col = cellNode.col, row = cellNode.row;
|
|
33
|
+
cellNode.children.forEach((node => {
|
|
34
|
+
"chart" === node.type && (node.updateData(scenegraph.table.getCellValue(col, row)),
|
|
35
|
+
node.addUpdateBoundTag());
|
|
36
|
+
}));
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function updateChartState(scenegraph, datum) {
|
|
42
|
+
const table = scenegraph.table;
|
|
43
|
+
if (table.isPivotChart()) {
|
|
44
|
+
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
45
|
+
if ((null === datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
|
|
46
|
+
if (table._selectedDataItemsInChart = [], Array.isArray(datum)) datum.forEach((dataItem => {
|
|
47
|
+
if (dataItem && 0 !== dataItem.key && Object.keys(dataItem).length > 0) {
|
|
48
|
+
const selectedState = {};
|
|
49
|
+
for (const itemKey in dataItem) itemKey.startsWith("VGRAMMAR_") || itemKey.startsWith("__VCHART") || (selectedState[itemKey] = dataItem[itemKey]);
|
|
50
|
+
table._selectedDataItemsInChart.push(selectedState);
|
|
51
|
+
}
|
|
52
|
+
})); else if (datum && 0 !== datum.key && Object.keys(datum).length > 0) {
|
|
53
|
+
const selectedState = {};
|
|
54
|
+
for (const itemKey in datum) itemKey.startsWith("VGRAMMAR_") || itemKey.startsWith("__VCHART") || (selectedState[itemKey] = datum[itemKey]);
|
|
55
|
+
table._selectedDataItemsInChart.push(selectedState);
|
|
56
|
+
}
|
|
57
|
+
if (0 === table._selectedDataItemsInChart.length && 0 === preSelectItemsCount) return;
|
|
58
|
+
table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
20
61
|
//# sourceMappingURL=update-chart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["scenegraph/refresh-node/update-chart.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,eAAe,CAAC,UAAsB,EAAE,GAAW;;IAEjE,KAAK,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE;QACpD,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC9C,MAAM,aAAa,GAAG,MAAC,WAAW,CAAC,SAAiB,0CAAE,aAAa,CAAC;QACpE,IAAI,aAAa,EAAE;YAEjB,WAAW,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,QAAe,EAAE,EAAE;gBACpD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBACzD,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;gBAE3D,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,IAAW,EAAE,EAAE;oBACxC,IAAK,IAAY,CAAC,IAAI,KAAK,OAAO,EAAE;wBAoBlC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;wBACxB,IAAI,CAAC,YAAY,CACf,OAAO,EACP,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,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';\nimport type { Scenegraph } from '../scenegraph';\n\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSize(scenegraph: Scenegraph, col: number) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = col; c < scenegraph.table.colCount; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n const chartInstance = (columnGroup.attribute as any)?.chartInstance;\n if (chartInstance) {\n // chartInstance.updateViewBox();\n columnGroup.getChildren().forEach((cellNode: Group) => {\n const width = scenegraph.table.getColWidth(cellNode.col);\n const height = scenegraph.table.getRowHeight(cellNode.row);\n\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n // 调试问题使用\n // if (columnGroup.col === 2) {\n // columnGroup.AABBBounds.width();\n // node.AABBBounds.width();\n // console.log(\n // 'set viewbox y1',\n // Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n // node.globalAABBBounds.height()\n // );\n\n // console.log(\n // 'updateChartSize',\n // columnGroup,\n // columnGroup.globalAABBBounds.y1,\n // cellNode.globalAABBBounds.y1,\n // node.globalAABBBounds.y1\n // );\n // }\n\n node.cacheCanvas = null;\n node.setAttribute(\n 'width',\n Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1])\n );\n node.setAttribute(\n 'height',\n Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n );\n\n node.setAttribute('viewBox', {\n x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),\n x2: Math.ceil(\n cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft\n ),\n y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n y2: Math.ceil(\n cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop\n )\n });\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,IAAI,mBAAmB,KAAK,CAAC,EAAE;YAC7F,OAAO;SACR;QAEA,KAAK,CAAC,aAAa,CAAC,SAA4B,CAAC,8BAA8B,EAAE,CAAC;QAEnF,oBAAoB,CAAC,UAAU,CAAC,CAAC;KAClC;AACH,CAAC","file":"update-chart.js","sourcesContent":["import type { PivotChart } from '../../PivotChart';\nimport type { PivotLayoutMap } from '../../layout/pivot-layout';\nimport type { Chart } from '../graphic/chart';\nimport type { Group } from '../graphic/group';\nimport type { Scenegraph } from '../scenegraph';\n\n/** 供调整列宽后更新chart使用 */\nexport function updateChartSize(scenegraph: Scenegraph, col: number) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = col; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n // const chartInstance = (columnGroup.attribute as any)?.chartInstance;\n // if (chartInstance) {\n columnGroup.getChildren().forEach((cellNode: Group) => {\n const width = scenegraph.table.getColWidth(cellNode.col);\n const height = scenegraph.table.getRowHeight(cellNode.row);\n\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n // 调试问题使用\n // if (columnGroup.col === 2) {\n // columnGroup.AABBBounds.width();\n // node.AABBBounds.width();\n // console.log(\n // 'set viewbox y1',\n // Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n // node.globalAABBBounds.height()\n // );\n\n // console.log(\n // 'updateChartSize',\n // columnGroup,\n // columnGroup.globalAABBBounds.y1,\n // cellNode.globalAABBBounds.y1,\n // node.globalAABBBounds.y1\n // );\n // }\n\n node.cacheCanvas = null;\n node.setAttribute('width', Math.ceil(width - node.attribute.cellPadding[3] - node.attribute.cellPadding[1]));\n node.setAttribute(\n 'height',\n Math.ceil(height - node.attribute.cellPadding[0] - node.attribute.cellPadding[2])\n );\n\n node.setAttribute('viewBox', {\n x1: Math.ceil(cellNode.globalAABBBounds.x1 + node.attribute.cellPadding[3] + scenegraph.table.scrollLeft),\n x2: Math.ceil(\n cellNode.globalAABBBounds.x1 + width - node.attribute.cellPadding[1] + scenegraph.table.scrollLeft\n ),\n y1: Math.ceil(cellNode.globalAABBBounds.y1 + node.attribute.cellPadding[0] + scenegraph.table.scrollTop),\n y2: Math.ceil(\n cellNode.globalAABBBounds.y1 + height - node.attribute.cellPadding[2] + scenegraph.table.scrollTop\n )\n });\n }\n });\n });\n // }\n }\n}\n\n/** 清理所有chart节点的 图表缓存图片 */\nexport function clearChartCacheImage(scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup.getChildren().forEach((cellNode: Group) => {\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.cacheCanvas = null;\n node.addUpdateBoundTag();\n }\n });\n });\n }\n}\n\n/** 更新所有的图表chart节点上缓存attribute中的data数据 */\nexport function updateChartData(scenegraph: Scenegraph) {\n // 将调整列宽的后面的面也都一起需要调整viewbox。 TODO:columnResizeType支持后需要根据变化的列去调整,范围可能变多或者变少\n for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {\n const columnGroup = scenegraph.getColGroup(c);\n columnGroup.getChildren().forEach((cellNode: Group) => {\n const col = cellNode.col;\n const row = cellNode.row;\n cellNode.children.forEach((node: Chart) => {\n if ((node as any).type === 'chart') {\n node.updateData(scenegraph.table.getCellValue(col, row));\n node.addUpdateBoundTag();\n }\n });\n });\n }\n}\n/** 组织图表数据状态_selectedDataItemsInChart 更新选中的图表图元状态 */\nexport function updateChartState(scenegraph: Scenegraph, datum: any) {\n const table = scenegraph.table;\n if (table.isPivotChart()) {\n const preSelectItemsCount = (table as PivotChart)._selectedDataItemsInChart.length;\n if ((datum === null || datum?.length === 0 || Object.keys(datum).length === 0) && preSelectItemsCount === 0) {\n //避免无效的更新\n return;\n }\n (table as PivotChart)._selectedDataItemsInChart = [];\n if (Array.isArray(datum)) {\n datum.forEach((dataItem: any) => {\n if (dataItem && dataItem.key !== 0 && Object.keys(dataItem).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {};\n for (const itemKey in dataItem) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = dataItem[itemKey];\n }\n }\n (table as PivotChart)._selectedDataItemsInChart.push(selectedState);\n }\n });\n } else if (datum && datum.key !== 0 && Object.keys(datum).length > 0) {\n //本以为没有点击到图元上 datum为空 发现是{key:0}或者{}\n const selectedState = {};\n for (const itemKey in datum) {\n if (!itemKey.startsWith('VGRAMMAR_') && !itemKey.startsWith('__VCHART')) {\n selectedState[itemKey] = datum[itemKey];\n }\n }\n (table as PivotChart)._selectedDataItemsInChart.push(selectedState);\n }\n //避免无效的更新\n if ((table as PivotChart)._selectedDataItemsInChart.length === 0 && preSelectItemsCount === 0) {\n return;\n }\n\n (table.internalProps.layoutMap as PivotLayoutMap).updateDataStateToChartInstance();\n // 清楚chart缓存图片\n clearChartCacheImage(scenegraph);\n }\n}\n"]}
|
|
@@ -18,6 +18,11 @@ export declare class Scenegraph {
|
|
|
18
18
|
cornerHeaderGroup: Group;
|
|
19
19
|
rowHeaderGroup: Group;
|
|
20
20
|
bodyGroup: Group;
|
|
21
|
+
rightFrozenGroup: Group;
|
|
22
|
+
bottomFrozenGroup: Group;
|
|
23
|
+
rightTopCellGroup: Group;
|
|
24
|
+
leftBottomCellGroup: Group;
|
|
25
|
+
rightBottomCellGroup: Group;
|
|
21
26
|
componentGroup: Group;
|
|
22
27
|
selectedRangeComponents: Map<string, {
|
|
23
28
|
rect: IRect;
|
|
@@ -36,6 +41,8 @@ export declare class Scenegraph {
|
|
|
36
41
|
hasFrozen: boolean;
|
|
37
42
|
frozenColCount: number;
|
|
38
43
|
frozenRowCount: number;
|
|
44
|
+
rightFrozenColCount: number;
|
|
45
|
+
bottomFrozenRowCount: number;
|
|
39
46
|
clear: boolean;
|
|
40
47
|
mergeMap: MergeMap;
|
|
41
48
|
constructor(table: BaseTableAPI);
|
|
@@ -78,6 +85,7 @@ export declare class Scenegraph {
|
|
|
78
85
|
setIconNormalStyle(icon: Icon, col: number, row: number): void;
|
|
79
86
|
updateColWidth(col: number, detaX: number): void;
|
|
80
87
|
updateChartSize(col: number): void;
|
|
88
|
+
updateChartState(datum: any): void;
|
|
81
89
|
updateAutoColWidth(col: number): void;
|
|
82
90
|
recalculateColWidths(): void;
|
|
83
91
|
recalculateRowHeights(): void;
|
|
@@ -94,6 +102,7 @@ export declare class Scenegraph {
|
|
|
94
102
|
setBodyAndColHeaderX(x: number): void;
|
|
95
103
|
afterScenegraphCreated(): void;
|
|
96
104
|
dealWidthMode(): void;
|
|
105
|
+
dealHeightMode(): void;
|
|
97
106
|
dealFrozen(): void;
|
|
98
107
|
resetFrozen(): void;
|
|
99
108
|
updateCellLayoutWidthCertainWidth(columnGroup: Group, detaRow: number, col: number): boolean;
|
|
@@ -52,7 +52,7 @@ import { computeRowsHeight } from "./layout/compute-row-height";
|
|
|
52
52
|
|
|
53
53
|
import { emptyGroup } from "./utils/empty-group";
|
|
54
54
|
|
|
55
|
-
import { updateChartSize } from "./refresh-node/update-chart";
|
|
55
|
+
import { updateChartSize, updateChartState } from "./refresh-node/update-chart";
|
|
56
56
|
|
|
57
57
|
import { dealFrozen, resetFrozen } from "./layout/frozen";
|
|
58
58
|
|
|
@@ -148,6 +148,24 @@ export class Scenegraph {
|
|
|
148
148
|
pickable: !1
|
|
149
149
|
});
|
|
150
150
|
bodyGroup.role = "body", this.bodyGroup = bodyGroup;
|
|
151
|
+
const rightFrozenGroup = new Group({
|
|
152
|
+
x: 0,
|
|
153
|
+
y: 0,
|
|
154
|
+
width: width,
|
|
155
|
+
height: 0,
|
|
156
|
+
clip: !1,
|
|
157
|
+
pickable: !1
|
|
158
|
+
});
|
|
159
|
+
rightFrozenGroup.role = "right-frozen", this.rightFrozenGroup = rightFrozenGroup;
|
|
160
|
+
const bottomFrozenGroup = new Group({
|
|
161
|
+
x: 0,
|
|
162
|
+
y: 0,
|
|
163
|
+
width: width,
|
|
164
|
+
height: 0,
|
|
165
|
+
clip: !1,
|
|
166
|
+
pickable: !1
|
|
167
|
+
});
|
|
168
|
+
bottomFrozenGroup.role = "bottom-frozen", this.bottomFrozenGroup = bottomFrozenGroup;
|
|
151
169
|
const componentGroup = new Group({
|
|
152
170
|
x: 0,
|
|
153
171
|
y: 0,
|
|
@@ -157,8 +175,47 @@ export class Scenegraph {
|
|
|
157
175
|
pickable: !1,
|
|
158
176
|
childrenPickable: !0
|
|
159
177
|
});
|
|
160
|
-
componentGroup.role = "component", this.componentGroup = componentGroup
|
|
161
|
-
|
|
178
|
+
componentGroup.role = "component", this.componentGroup = componentGroup;
|
|
179
|
+
const rightTopCellGroup = new Group({
|
|
180
|
+
x: 0,
|
|
181
|
+
y: 0,
|
|
182
|
+
width: 0,
|
|
183
|
+
height: 0,
|
|
184
|
+
visible: !1,
|
|
185
|
+
pickable: !0,
|
|
186
|
+
fill: this.table.theme.cornerHeaderStyle.bgColor,
|
|
187
|
+
stroke: this.table.theme.cornerHeaderStyle.borderColor,
|
|
188
|
+
lineWidth: this.table.theme.cornerHeaderStyle.borderLineWidth
|
|
189
|
+
});
|
|
190
|
+
rightTopCellGroup.role = "corner-frozen", this.rightTopCellGroup = rightTopCellGroup;
|
|
191
|
+
const leftBottomCellGroup = new Group({
|
|
192
|
+
x: 0,
|
|
193
|
+
y: 0,
|
|
194
|
+
width: 0,
|
|
195
|
+
height: 0,
|
|
196
|
+
visible: !1,
|
|
197
|
+
pickable: !0,
|
|
198
|
+
fill: this.table.theme.cornerHeaderStyle.bgColor,
|
|
199
|
+
stroke: this.table.theme.cornerHeaderStyle.borderColor,
|
|
200
|
+
lineWidth: this.table.theme.cornerHeaderStyle.borderLineWidth
|
|
201
|
+
});
|
|
202
|
+
leftBottomCellGroup.role = "corner-frozen", this.leftBottomCellGroup = leftBottomCellGroup;
|
|
203
|
+
const rightBottomCellGroup = new Group({
|
|
204
|
+
x: 0,
|
|
205
|
+
y: 0,
|
|
206
|
+
width: 0,
|
|
207
|
+
height: 0,
|
|
208
|
+
visible: !1,
|
|
209
|
+
pickable: !0,
|
|
210
|
+
fill: this.table.theme.cornerHeaderStyle.bgColor,
|
|
211
|
+
stroke: this.table.theme.cornerHeaderStyle.borderColor,
|
|
212
|
+
lineWidth: this.table.theme.cornerHeaderStyle.borderLineWidth
|
|
213
|
+
});
|
|
214
|
+
rightBottomCellGroup.role = "corner-frozen", this.rightBottomCellGroup = rightBottomCellGroup,
|
|
215
|
+
this.tableGroup.addChild(bodyGroup), this.tableGroup.addChild(rightFrozenGroup),
|
|
216
|
+
this.tableGroup.addChild(bottomFrozenGroup), this.tableGroup.addChild(rowHeaderGroup),
|
|
217
|
+
this.tableGroup.addChild(colHeaderGroup), this.tableGroup.addChild(rightBottomCellGroup),
|
|
218
|
+
this.tableGroup.addChild(rightTopCellGroup), this.tableGroup.addChild(leftBottomCellGroup),
|
|
162
219
|
this.tableGroup.addChild(cornerHeaderGroup), this.tableGroup.addChild(componentGroup);
|
|
163
220
|
}
|
|
164
221
|
clearCells() {
|
|
@@ -184,11 +241,39 @@ export class Scenegraph {
|
|
|
184
241
|
y: 0,
|
|
185
242
|
width: 0,
|
|
186
243
|
height: 0
|
|
187
|
-
}), this.
|
|
244
|
+
}), this.rightFrozenGroup.setAttributes({
|
|
245
|
+
x: 0,
|
|
246
|
+
y: 0,
|
|
247
|
+
width: 0,
|
|
248
|
+
height: 0
|
|
249
|
+
}), this.bottomFrozenGroup.setAttributes({
|
|
188
250
|
x: 0,
|
|
189
251
|
y: 0,
|
|
190
252
|
width: 0,
|
|
191
253
|
height: 0
|
|
254
|
+
}), this.rightTopCellGroup.setAttributes({
|
|
255
|
+
x: 0,
|
|
256
|
+
y: 0,
|
|
257
|
+
width: 0,
|
|
258
|
+
height: 0,
|
|
259
|
+
visible: !1
|
|
260
|
+
}), this.leftBottomCellGroup.setAttributes({
|
|
261
|
+
x: 0,
|
|
262
|
+
y: 0,
|
|
263
|
+
width: 0,
|
|
264
|
+
height: 0,
|
|
265
|
+
visible: !1
|
|
266
|
+
}), this.rightTopCellGroup.setAttributes({
|
|
267
|
+
x: 0,
|
|
268
|
+
y: 0,
|
|
269
|
+
width: 0,
|
|
270
|
+
height: 0,
|
|
271
|
+
visible: !1
|
|
272
|
+
}), this.tableGroup.setAttributes({
|
|
273
|
+
x: this.table.tableX,
|
|
274
|
+
y: this.table.tableY,
|
|
275
|
+
width: 0,
|
|
276
|
+
height: 0
|
|
192
277
|
}), this.tableGroup.border && (this.tableGroup.parent.removeChild(this.tableGroup.border),
|
|
193
278
|
delete this.tableGroup.border);
|
|
194
279
|
}
|
|
@@ -199,7 +284,7 @@ export class Scenegraph {
|
|
|
199
284
|
createSceneGraph() {
|
|
200
285
|
this.clear = !1, this.frozenColCount = this.table.rowHeaderLevelCount, this.frozenRowCount = this.table.columnHeaderLevelCount,
|
|
201
286
|
this.proxy = new SceneProxy(this.table), createFrameBorder(this.tableGroup, this.table.theme.frameStyle, this.tableGroup.role, void 0, !0),
|
|
202
|
-
this.proxy.createGroupForFirstScreen(this.cornerHeaderGroup, this.colHeaderGroup, this.rowHeaderGroup, this.bodyGroup, 0, 0),
|
|
287
|
+
this.proxy.createGroupForFirstScreen(this.cornerHeaderGroup, this.colHeaderGroup, this.rowHeaderGroup, this.rightFrozenGroup, this.bottomFrozenGroup, this.bodyGroup, 0, 0),
|
|
203
288
|
this.afterScenegraphCreated();
|
|
204
289
|
}
|
|
205
290
|
renderSceneGraph() {
|
|
@@ -221,9 +306,10 @@ export class Scenegraph {
|
|
|
221
306
|
element || void 0;
|
|
222
307
|
}
|
|
223
308
|
getCell(col, row, getShadow) {
|
|
224
|
-
var _a;
|
|
225
|
-
let cell
|
|
226
|
-
if (cell &&
|
|
309
|
+
var _a, _b, _c;
|
|
310
|
+
let cell;
|
|
311
|
+
if (cell = this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? null === (_a = this.rightFrozenGroup.getColGroup(col)) || void 0 === _a ? void 0 : _a.getRowGroup(row) : this.table.bottomFrozenRowCount > 0 && row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount ? null === (_b = this.bottomFrozenGroup.getColGroup(col)) || void 0 === _b ? void 0 : _b.getRowGroup(row) : null === (_c = this.getColGroup(col, row < this.frozenRowCount)) || void 0 === _c ? void 0 : _c.getRowGroup(row),
|
|
312
|
+
cell && "shadow-cell" === cell.role && !getShadow) {
|
|
227
313
|
const range = this.table.getCellRange(col, row);
|
|
228
314
|
cell = this.getCell(range.start.col, range.start.row);
|
|
229
315
|
}
|
|
@@ -234,7 +320,7 @@ export class Scenegraph {
|
|
|
234
320
|
}
|
|
235
321
|
getColGroup(col, isCornerOrColHeader = !1) {
|
|
236
322
|
let element;
|
|
237
|
-
return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.bodyGroup.getColGroup(col),
|
|
323
|
+
return element = col < this.frozenColCount && isCornerOrColHeader ? this.cornerHeaderGroup.getColGroup(col) : col < this.frozenColCount ? this.rowHeaderGroup.getColGroup(col) : isCornerOrColHeader ? this.colHeaderGroup.getColGroup(col) : this.table.rightFrozenColCount > 0 && col > this.table.colCount - 1 - this.table.rightFrozenColCount ? this.rightFrozenGroup.getColGroup(col) : this.bodyGroup.getColGroup(col),
|
|
238
324
|
element || void 0;
|
|
239
325
|
}
|
|
240
326
|
getCellSize(col, row) {
|
|
@@ -359,6 +445,9 @@ export class Scenegraph {
|
|
|
359
445
|
updateChartSize(col) {
|
|
360
446
|
updateChartSize(this, col);
|
|
361
447
|
}
|
|
448
|
+
updateChartState(datum) {
|
|
449
|
+
this.table.isPivotChart() && updateChartState(this, datum);
|
|
450
|
+
}
|
|
362
451
|
updateAutoColWidth(col) {
|
|
363
452
|
const oldWidth = this.table.getColWidth(col), newWidth = computeColWidth(col, 0, this.table.rowCount - 1, this.table, !0);
|
|
364
453
|
newWidth !== oldWidth && this.updateColWidth(col, newWidth - oldWidth);
|
|
@@ -370,19 +459,39 @@ export class Scenegraph {
|
|
|
370
459
|
computeRowsHeight(this.table, 0, this.table.rowCount - 1);
|
|
371
460
|
}
|
|
372
461
|
resize() {
|
|
373
|
-
this.recalculateColWidths(), this.table.
|
|
374
|
-
this.dealWidthMode(), this.
|
|
375
|
-
this.component.updateScrollBar(), this.updateNextFrame();
|
|
462
|
+
this.recalculateColWidths(), "autoHeight" === this.table.heightMode && this.recalculateRowHeights(),
|
|
463
|
+
this.dealWidthMode(), this.dealHeightMode(), this.dealFrozen(), this.updateTableSize(),
|
|
464
|
+
this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), this.updateNextFrame();
|
|
376
465
|
}
|
|
377
466
|
updateTableSize() {
|
|
378
467
|
var _a, _b;
|
|
379
468
|
this.tableGroup.setAttributes({
|
|
380
|
-
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0)),
|
|
381
|
-
height: Math.min(this.table.tableNoFrameHeight, (null !== (_a = this.colHeaderGroup.attribute.height) && void 0 !== _a ? _a : 0) + (null !== (_b = this.bodyGroup.attribute.height) && void 0 !== _b ? _b : 0))
|
|
469
|
+
width: Math.min(this.table.tableNoFrameWidth, Math.max(this.colHeaderGroup.attribute.width, this.bodyGroup.attribute.width, 0) + Math.max(this.cornerHeaderGroup.attribute.width, this.rowHeaderGroup.attribute.width, 0) + this.rightBottomCellGroup.attribute.width),
|
|
470
|
+
height: Math.min(this.table.tableNoFrameHeight, (null !== (_a = this.colHeaderGroup.attribute.height) && void 0 !== _a ? _a : 0) + (null !== (_b = this.bodyGroup.attribute.height) && void 0 !== _b ? _b : 0) + this.bottomFrozenGroup.attribute.height)
|
|
382
471
|
}), this.tableGroup.border && this.tableGroup.border.setAttributes({
|
|
383
472
|
width: this.tableGroup.attribute.width + this.tableGroup.border.attribute.lineWidth,
|
|
384
473
|
height: this.tableGroup.attribute.height + this.tableGroup.border.attribute.lineWidth
|
|
385
|
-
})
|
|
474
|
+
}), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("y", this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height),
|
|
475
|
+
this.leftBottomCellGroup.setAttributes({
|
|
476
|
+
visible: !0,
|
|
477
|
+
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
478
|
+
height: this.bottomFrozenGroup.attribute.height,
|
|
479
|
+
width: this.table.getFrozenColsWidth()
|
|
480
|
+
}), this.rightBottomCellGroup.setAttributes({
|
|
481
|
+
visible: !0,
|
|
482
|
+
y: this.tableGroup.attribute.height - this.bottomFrozenGroup.attribute.height,
|
|
483
|
+
height: this.bottomFrozenGroup.attribute.height
|
|
484
|
+
})), this.table.rightFrozenColCount > 0 && (this.rightFrozenGroup.setAttribute("x", this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width),
|
|
485
|
+
this.rightTopCellGroup.setAttributes({
|
|
486
|
+
visible: !0,
|
|
487
|
+
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
488
|
+
width: this.rightFrozenGroup.attribute.width,
|
|
489
|
+
height: this.table.getFrozenRowsHeight()
|
|
490
|
+
}), this.rightBottomCellGroup.setAttributes({
|
|
491
|
+
visible: !0,
|
|
492
|
+
x: this.tableGroup.attribute.width - this.rightFrozenGroup.attribute.width,
|
|
493
|
+
width: this.rightFrozenGroup.attribute.width
|
|
494
|
+
}));
|
|
386
495
|
}
|
|
387
496
|
updateRowHeight(row, detaY) {
|
|
388
497
|
updateRowHeight(this, row, detaY), this.updateContainerHeight(row, detaY);
|
|
@@ -416,16 +525,19 @@ export class Scenegraph {
|
|
|
416
525
|
setBodyAndRowHeaderY(y) {
|
|
417
526
|
this.colHeaderGroup.attribute.height + y !== this.bodyGroup.attribute.y && (this.bodyGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
418
527
|
this.rowHeaderGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
528
|
+
this.table.rightFrozenColCount > 0 && this.rightFrozenGroup.setAttribute("y", this.colHeaderGroup.attribute.height + y),
|
|
419
529
|
this.updateNextFrame());
|
|
420
530
|
}
|
|
421
531
|
setBodyAndColHeaderX(x) {
|
|
422
532
|
this.rowHeaderGroup.attribute.width + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
423
533
|
this.colHeaderGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
534
|
+
this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.rowHeaderGroup.attribute.width + x),
|
|
424
535
|
this.updateNextFrame());
|
|
425
536
|
}
|
|
426
537
|
afterScenegraphCreated() {
|
|
427
|
-
this.dealWidthMode(), this.
|
|
428
|
-
this.component.updateScrollBar(), handleTextStick(this.table),
|
|
538
|
+
this.dealWidthMode(), this.dealHeightMode(), this.dealFrozen(), this.createFrameBorder(),
|
|
539
|
+
this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table),
|
|
540
|
+
this.updateNextFrame();
|
|
429
541
|
}
|
|
430
542
|
dealWidthMode() {
|
|
431
543
|
const table = this.table;
|
|
@@ -439,7 +551,7 @@ export class Scenegraph {
|
|
|
439
551
|
colWidth = col === table.colCount - 1 ? totalDrawWidth - table.getColsWidth(0, table.colCount - 2) : Math.round(table.getColWidth(col) * factor),
|
|
440
552
|
this.setColWidth(col, colWidth);
|
|
441
553
|
}
|
|
442
|
-
} else if (
|
|
554
|
+
} else if (table.autoFillWidth) {
|
|
443
555
|
const canvasWidth = table.tableNoFrameWidth;
|
|
444
556
|
let actualWidth = 0, actualHeaderWidth = 0;
|
|
445
557
|
for (let col = 0; col < table.colCount; col++) {
|
|
@@ -472,6 +584,21 @@ export class Scenegraph {
|
|
|
472
584
|
y: this.colHeaderGroup.attribute.height
|
|
473
585
|
});
|
|
474
586
|
}
|
|
587
|
+
dealHeightMode() {
|
|
588
|
+
const table = this.table;
|
|
589
|
+
if ("adaptive" === table.heightMode) {
|
|
590
|
+
table._clearRowRangeHeightsMap();
|
|
591
|
+
const totalDrawHeight = table.tableNoFrameHeight - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
592
|
+
let actualHeight = 0;
|
|
593
|
+
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) actualHeight += table.getRowHeight(row);
|
|
594
|
+
const factor = totalDrawHeight / actualHeight;
|
|
595
|
+
for (let row = table.frozenRowCount; row < table.rowCount - table.bottomFrozenRowCount; row++) {
|
|
596
|
+
let rowHeight;
|
|
597
|
+
rowHeight = row === table.rowCount - table.bottomFrozenRowCount - 1 ? totalDrawHeight - table.getRowsHeight(table.frozenRowCount, table.rowCount - table.bottomFrozenRowCount - 2) : Math.round(table.getRowHeight(row) * factor),
|
|
598
|
+
this.setRowHeight(row, rowHeight);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
475
602
|
dealFrozen() {
|
|
476
603
|
dealFrozen(this);
|
|
477
604
|
}
|
|
@@ -636,7 +763,7 @@ export class Scenegraph {
|
|
|
636
763
|
this.findAndUpdateIcon(cellGroup, [ IconFuncTypeEnum.collapse, IconFuncTypeEnum.expand ], iconConfig);
|
|
637
764
|
}
|
|
638
765
|
updateRow(removeCells, addCells) {
|
|
639
|
-
updateRow(removeCells, addCells, this.table), this.recalculateColWidths(), this.table.
|
|
766
|
+
updateRow(removeCells, addCells, this.table), this.recalculateColWidths(), "autoHeight" === this.table.heightMode && this.recalculateRowHeights(),
|
|
640
767
|
this.table.stateManeger.checkFrozen(), this.updateNextFrame();
|
|
641
768
|
}
|
|
642
769
|
findAndUpdateIcon(group, funcTypeArr, iconConfig) {
|