Skip to content

Commit

Permalink
fix: fix content position update problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Feb 8, 2024
1 parent f017e22 commit 2d15d73
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "fix: fix content position update problem",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}
4 changes: 2 additions & 2 deletions packages/vtable/src/scenegraph/group-creater/cell-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,9 @@ export function updateCell(col: number, row: number, table: BaseTableAPI, addNew
dx: hierarchyOffset,
x
};
const oldText = textMark.attribute.text;
// const oldText = textMark.attribute.text;
textMark.setAttributes(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);
if (!oldText && textMark.attribute.text) {
if (textMark.attribute.text) {
const textBaseline = cellTheme.text.textBaseline;
const height = cellHeight - (padding[0] + padding[2]);
let y = 0;
Expand Down

0 comments on commit 2d15d73

Please sign in to comment.