Skip to content

Commit 7d95903

Browse files
committed
[FIX] style: rotation fix for centered text
1 parent 7e17cf6 commit 7d95903

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/o-spreadsheet-engine/src/helpers/text_helper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ export function computeRotationPosition(
469469
} else {
470470
if (center) {
471471
x -= sh / 2;
472+
y -= height / 2;
473+
if (rotateTowardCellCenter) {
474+
y += sh;
475+
} else {
476+
y -= sh;
477+
}
472478
} else if (rotateTowardCellCenter) {
473479
x -= sh;
474480
y -= sw / 2;

0 commit comments

Comments
 (0)