Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

fix(sheet-ui): comment out offsetLeft calculation for center alignment (#6039)

WEI ZHANGb77acb02c13c
diff --git a/packages/sheets-ui/src/services/editor/cell-editor-resize.service.ts b/packages/sheets-ui/src/services/editor/cell-editor-resize.service.ts
index 102c20cf02..15c49c5415 100644
--- a/packages/sheets-ui/src/services/editor/cell-editor-resize.service.ts
+++ b/packages/sheets-ui/src/services/editor/cell-editor-resize.service.ts
@@ -130,7 +130,7 @@ export class SheetCellEditorResizeService extends Disposable {
let offsetLeft = 0;
if (horizontalAlign === HorizontalAlign.CENTER) {
- offsetLeft = (editorWidth - actualWidth) / 2 / scaleX;
+ // offsetLeft = ((editorWidth - actualWidth) / 2 / scaleX);
} else if (horizontalAlign === HorizontalAlign.RIGHT) {
offsetLeft = (editorWidth - actualWidth) / scaleX;
} else {