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.
TypeScript boardcollaborationdocdocxexceloffce365officepdfpptpptxpresentationsdksheetslidesspreadsheetuniverwordwordprocessorworkspacexlsx
fix(sheet): set bottom by default for vertical align (#1929)
Univer392f320d9844
diff --git a/packages/engine-formula/src/engine/dependency/dependency-tree.ts b/packages/engine-formula/src/engine/dependency/dependency-tree.tsindex 4f05bb43ad..b1303b4203 100644--- a/packages/engine-formula/src/engine/dependency/dependency-tree.ts+++ b/packages/engine-formula/src/engine/dependency/dependency-tree.ts@@ -153,7 +153,6 @@ export class FormulaDependencyTree extends Disposable {}const sheetRangeMap = dependencyRangeList.get(unitId)!;-if (!sheetRangeMap.has(sheetId)) {continue;}@@ -199,7 +198,6 @@ export class FormulaDependencyTree extends Disposable {}}}-return false;}diff --git a/packages/sheets-ui/src/controllers/menu/menu.ts b/packages/sheets-ui/src/controllers/menu/menu.tsindex 47bd7fc9d7..3f45f455fc 100644--- a/packages/sheets-ui/src/controllers/menu/menu.ts+++ b/packages/sheets-ui/src/controllers/menu/menu.ts@@ -680,13 +680,13 @@ export function VerticalAlignMenuItemFactory(accessor: IAccessor): IMenuSelectorreturn {id: SetVerticalTextAlignCommand.id,- icon: VERTICAL_ALIGN_CHILDREN[0].icon,+ icon: VERTICAL_ALIGN_CHILDREN[2].icon,tooltip: 'toolbar.verticalAlignMode.main',group: MenuGroup.TOOLBAR_LAYOUT,type: MenuItemType.SELECTOR,positions: [MenuPosition.TOOLBAR_START],selections: VERTICAL_ALIGN_CHILDREN,- value$: deriveStateFromActiveSheet$(univerInstanceService, VerticalAlign.TOP, ({ worksheet }) => new Observable<VerticalAlign>((subscriber) => {+ value$: deriveStateFromActiveSheet$(univerInstanceService, VerticalAlign.BOTTOM, ({ worksheet }) => new Observable<VerticalAlign>((subscriber) => {const disposable = accessor.get(ICommandService).onCommandExecuted((c) => {const id = c.id;if (id !== SetVerticalTextAlignCommand.id && id !== SetSelectionsOperation.id && id !== SetWorksheetActiveOperation.id) {@@ -700,7 +700,7 @@ export function VerticalAlignMenuItemFactory(accessor: IAccessor): IMenuSelectorva = range?.getVerticalAlignment();}- subscriber.next(va ?? VerticalAlign.TOP);+ subscriber.next(va ?? VerticalAlign.BOTTOM);});const primary = selectionManagerService.getLast()?.primary;@@ -710,7 +710,7 @@ export function VerticalAlignMenuItemFactory(accessor: IAccessor): IMenuSelectorva = range?.getVerticalAlignment();}- subscriber.next(va ?? VerticalAlign.TOP);+ subscriber.next(va ?? VerticalAlign.BOTTOM);return disposable.dispose;})),