Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: when has many columns expand columnTree scenegraph node y error #4357\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}
3 changes: 3 additions & 0 deletions packages/vtable/src/scenegraph/group-creater/column-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export function createComplexColumn(
y = (columnGroup.lastChild as Group).attribute.y + (columnGroup.lastChild as Group).attribute.height;
} else if (columnGroup.colHeight) {
y = columnGroup.colHeight;
} else if (rowStart >= table.columnHeaderLevelCount) {
// 这个if判断为了解决#4357 当传入的rowStart例如50但是columnGroup中并没有其他cell的情况下,上面逻辑有问题y赋值的0 导致新建单元格错位
y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1);
}

for (let j = rowStart; j <= rowEnd; j++) {
Expand Down