Skip to content

Commit

Permalink
fix: add keepCenterInLine config in Text graphic
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Dec 6, 2024
1 parent 84dc5a7 commit f23b75c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/vtable/src/scenegraph/utils/text-icon-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ export function createCellContent(
? 'normal'
: text.length === 1 && !autoWrapText
? 'no-wrap'
: 'normal'
: 'normal',
keepCenterInLine: true
};
const wrapText = new Text(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);
wrapText.name = 'text';
Expand Down Expand Up @@ -263,7 +264,8 @@ export function createCellContent(
: text.length === 1 && !autoWrapText
? 'no-wrap'
: 'normal',
dx: (textAlign === 'left' ? (!contentLeftIcons.length ? hierarchyOffset : 0) : 0) + _contentOffset
dx: (textAlign === 'left' ? (!contentLeftIcons.length ? hierarchyOffset : 0) : 0) + _contentOffset,
keepCenterInLine: true
};
const wrapText = new Text(cellTheme.text ? (Object.assign({}, cellTheme.text, attribute) as any) : attribute);
wrapText.name = 'text';
Expand Down

0 comments on commit f23b75c

Please sign in to comment.