From 8afcb7b5806e99899e1e25a15e6eb9ca22f413a3 Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Thu, 13 Jun 2024 14:09:34 +0800 Subject: [PATCH 1/2] fix: fix merge cell size update #1869 --- ...7-feature-selected-highlight_2024-06-05-03-27.json | 11 ----------- ...icon-tooltip-delay-disappear_2024-06-05-10-34.json | 11 ----------- ...efactor-updatepivotsortstate_2024-06-07-12-32.json | 11 ----------- ...ure-keyboard-arrow-shiftCtrl_2024-06-11-12-07.json | 11 ----------- .../1882-bug-inlineFront-icon_2024-06-12-04-01.json | 11 ----------- ...rill-down-icon-can-not-click_2024-06-12-10-50.json | 11 ----------- .../vtable/feat-export-icon_2024-06-05-07-00.json | 10 ---------- .../feat-inputEditorConfig_2024-06-05-03-03.json | 11 ----------- .../vtable/fix-bug-fix-for-fs_2024-06-12-04-05.json | 10 ---------- .../vtable/fix-bug-fix-for-fs_2024-06-12-04-06.json | 10 ---------- .../vtable/fix-bug-fix-for-fs_2024-06-12-04-07.json | 10 ---------- .../vtable/fix-ellipsis_2024-06-11-08-30.json | 10 ---------- ... fix-merge-cell-size-update_2024-06-13-04-41.json} | 2 +- .../src/scenegraph/group-creater/cell-helper.ts | 4 ++-- 14 files changed, 3 insertions(+), 130 deletions(-) delete mode 100644 common/changes/@visactor/vtable/1167-feature-selected-highlight_2024-06-05-03-27.json delete mode 100644 common/changes/@visactor/vtable/1848-feature-icon-tooltip-delay-disappear_2024-06-05-10-34.json delete mode 100644 common/changes/@visactor/vtable/1865-refactor-updatepivotsortstate_2024-06-07-12-32.json delete mode 100644 common/changes/@visactor/vtable/1873-feature-keyboard-arrow-shiftCtrl_2024-06-11-12-07.json delete mode 100644 common/changes/@visactor/vtable/1882-bug-inlineFront-icon_2024-06-12-04-01.json delete mode 100644 common/changes/@visactor/vtable/1899-bug-drill-down-icon-can-not-click_2024-06-12-10-50.json delete mode 100644 common/changes/@visactor/vtable/feat-export-icon_2024-06-05-07-00.json delete mode 100644 common/changes/@visactor/vtable/feat-inputEditorConfig_2024-06-05-03-03.json delete mode 100644 common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-05.json delete mode 100644 common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-06.json delete mode 100644 common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-07.json delete mode 100644 common/changes/@visactor/vtable/fix-ellipsis_2024-06-11-08-30.json rename common/changes/@visactor/vtable/{feat-text-stroke_2024-06-05-07-42.json => fix-merge-cell-size-update_2024-06-13-04-41.json} (69%) diff --git a/common/changes/@visactor/vtable/1167-feature-selected-highlight_2024-06-05-03-27.json b/common/changes/@visactor/vtable/1167-feature-selected-highlight_2024-06-05-03-27.json deleted file mode 100644 index 63839fd1b..000000000 --- a/common/changes/@visactor/vtable/1167-feature-selected-highlight_2024-06-05-03-27.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "refactor: memory release logic optimization #1856\n\n", - "type": "none", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/1848-feature-icon-tooltip-delay-disappear_2024-06-05-10-34.json b/common/changes/@visactor/vtable/1848-feature-icon-tooltip-delay-disappear_2024-06-05-10-34.json deleted file mode 100644 index 4d7db5257..000000000 --- a/common/changes/@visactor/vtable/1848-feature-icon-tooltip-delay-disappear_2024-06-05-10-34.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "feat: tooltip disappear delay time #1848\n\n", - "type": "minor", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} diff --git a/common/changes/@visactor/vtable/1865-refactor-updatepivotsortstate_2024-06-07-12-32.json b/common/changes/@visactor/vtable/1865-refactor-updatepivotsortstate_2024-06-07-12-32.json deleted file mode 100644 index 006becd78..000000000 --- a/common/changes/@visactor/vtable/1865-refactor-updatepivotsortstate_2024-06-07-12-32.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "feat: add sort config for pivotTable #1865\n\n", - "type": "minor", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} diff --git a/common/changes/@visactor/vtable/1873-feature-keyboard-arrow-shiftCtrl_2024-06-11-12-07.json b/common/changes/@visactor/vtable/1873-feature-keyboard-arrow-shiftCtrl_2024-06-11-12-07.json deleted file mode 100644 index c5e826f1b..000000000 --- a/common/changes/@visactor/vtable/1873-feature-keyboard-arrow-shiftCtrl_2024-06-11-12-07.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "refactor: arrow key with shift ctrl key to select cells #1873\n\n", - "type": "none", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/1882-bug-inlineFront-icon_2024-06-12-04-01.json b/common/changes/@visactor/vtable/1882-bug-inlineFront-icon_2024-06-12-04-01.json deleted file mode 100644 index 0c9b6be91..000000000 --- a/common/changes/@visactor/vtable/1882-bug-inlineFront-icon_2024-06-12-04-01.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "fix: icon inlineEnd inlineFront x position compute error #1882\n\n", - "type": "none", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/1899-bug-drill-down-icon-can-not-click_2024-06-12-10-50.json b/common/changes/@visactor/vtable/1899-bug-drill-down-icon-can-not-click_2024-06-12-10-50.json deleted file mode 100644 index 2e593f45e..000000000 --- a/common/changes/@visactor/vtable/1899-bug-drill-down-icon-can-not-click_2024-06-12-10-50.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "fix: drill down icon can not be click #1899\n\n", - "type": "none", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/feat-export-icon_2024-06-05-07-00.json b/common/changes/@visactor/vtable/feat-export-icon_2024-06-05-07-00.json deleted file mode 100644 index 9c52eaea3..000000000 --- a/common/changes/@visactor/vtable/feat-export-icon_2024-06-05-07-00.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vtable", - "comment": "feat: add ignoreIcon&formatExportOutput config in vtable-export #1813", - "type": "none" - } - ], - "packageName": "@visactor/vtable" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/feat-inputEditorConfig_2024-06-05-03-03.json b/common/changes/@visactor/vtable/feat-inputEditorConfig_2024-06-05-03-03.json deleted file mode 100644 index 97c5b1dc8..000000000 --- a/common/changes/@visactor/vtable/feat-inputEditorConfig_2024-06-05-03-03.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "changes": [ - { - "comment": "feat: add textArea editor\n\n", - "type": "none", - "packageName": "@visactor/vtable" - } - ], - "packageName": "@visactor/vtable", - "email": "892739385@qq.com" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-05.json b/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-05.json deleted file mode 100644 index 1c1f2518e..000000000 --- a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-05.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vtable", - "comment": "feat: add dx&dy in title component #1874", - "type": "none" - } - ], - "packageName": "@visactor/vtable" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-06.json b/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-06.json deleted file mode 100644 index c606cecf2..000000000 --- a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-06.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vtable", - "comment": "fix: fix frozenColCount large than colCount error #1872", - "type": "none" - } - ], - "packageName": "@visactor/vtable" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-07.json b/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-07.json deleted file mode 100644 index 9e36bdaa6..000000000 --- a/common/changes/@visactor/vtable/fix-bug-fix-for-fs_2024-06-12-04-07.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vtable", - "comment": "feat: add shrinkSparklineFirst config #1862", - "type": "none" - } - ], - "packageName": "@visactor/vtable" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/fix-ellipsis_2024-06-11-08-30.json b/common/changes/@visactor/vtable/fix-ellipsis_2024-06-11-08-30.json deleted file mode 100644 index c6469cb6e..000000000 --- a/common/changes/@visactor/vtable/fix-ellipsis_2024-06-11-08-30.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vtable", - "comment": "fix: fix ellipsis error in _disableColumnAndRowSizeRound mode #1884", - "type": "none" - } - ], - "packageName": "@visactor/vtable" -} \ No newline at end of file diff --git a/common/changes/@visactor/vtable/feat-text-stroke_2024-06-05-07-42.json b/common/changes/@visactor/vtable/fix-merge-cell-size-update_2024-06-13-04-41.json similarity index 69% rename from common/changes/@visactor/vtable/feat-text-stroke_2024-06-05-07-42.json rename to common/changes/@visactor/vtable/fix-merge-cell-size-update_2024-06-13-04-41.json index 1b799cbb8..9238b9ffd 100644 --- a/common/changes/@visactor/vtable/feat-text-stroke_2024-06-05-07-42.json +++ b/common/changes/@visactor/vtable/fix-merge-cell-size-update_2024-06-13-04-41.json @@ -2,7 +2,7 @@ "changes": [ { "packageName": "@visactor/vtable", - "comment": "feat: add strokeColor style #1847", + "comment": "fix: fix merge cell size update #1869", "type": "none" } ], diff --git a/packages/vtable/src/scenegraph/group-creater/cell-helper.ts b/packages/vtable/src/scenegraph/group-creater/cell-helper.ts index 9ad30d1bd..5d8e256d1 100644 --- a/packages/vtable/src/scenegraph/group-creater/cell-helper.ts +++ b/packages/vtable/src/scenegraph/group-creater/cell-helper.ts @@ -739,7 +739,7 @@ export function dealWithMergeCellSize( for (let row = range.start.row; row <= range.end.row; row++) { const cellGroup = table.scenegraph.getCell(col, row, true); - if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentWidth !== cellWidth) { + if (cellGroup.role === 'cell' && range.start.row !== range.end.row && cellGroup.contentHeight !== cellHeight) { updateCellContentHeight( cellGroup, cellHeight, @@ -752,7 +752,7 @@ export function dealWithMergeCellSize( // 'middle' ); } - if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentHeight !== cellHeight) { + if (cellGroup.role === 'cell' && range.start.col !== range.end.col && cellGroup.contentWidth !== cellWidth) { updateCellContentWidth( cellGroup, cellWidth, From 984aaa51352fdc3b5a05b39deb4d10ba9baaf8c5 Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Thu, 13 Jun 2024 15:00:20 +0800 Subject: [PATCH 2/2] fix: fix frozenColCount large than colCount error #1872 --- packages/vtable/src/scenegraph/layout/frozen.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vtable/src/scenegraph/layout/frozen.ts b/packages/vtable/src/scenegraph/layout/frozen.ts index 62dd6b7e1..e028d6c9a 100644 --- a/packages/vtable/src/scenegraph/layout/frozen.ts +++ b/packages/vtable/src/scenegraph/layout/frozen.ts @@ -17,6 +17,9 @@ export function dealFrozen(scene: Scenegraph) { } } else if (scene.table.frozenColCount < scene.table.rowHeaderLevelCount) { // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup) + scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height); + scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y); + scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height); for (let i = 0; i < scene.table.rowHeaderLevelCount - scene.table.frozenColCount; i++) { moveColumnFromRowHeaderToBody(scene); moveColumnFromCornerHeaderToColHeader(scene); @@ -47,6 +50,9 @@ export function dealFrozen(scene: Scenegraph) { export function resetFrozen(scene: Scenegraph) { if (scene.frozenColCount > scene.table.frozenColCount) { // move columnGroup from rowHeaderGroup into bodyGroup(from cornerHeaderGroup into colHeaderGroup) + scene.bodyGroup.setAttribute('height', scene.rowHeaderGroup.attribute.height); + scene.bodyGroup.setAttribute('y', scene.rowHeaderGroup.attribute.y); + scene.colHeaderGroup.setAttribute('height', scene.cornerHeaderGroup.attribute.height); for (let i = 0; i < scene.frozenColCount - scene.table.frozenColCount; i++) { moveColumnFromRowHeaderToBody(scene); moveColumnFromCornerHeaderToColHeader(scene);