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(sheets-drawing): align worksheet background images (#7731)
wpxp1234562b3037103a16
diff --git a/packages/sheets-drawing-ui/src/controllers/__tests__/sheet-drawing-update.controller.spec.ts b/packages/sheets-drawing-ui/src/controllers/__tests__/sheet-drawing-update.controller.spec.tsindex 5b67b2a9ae..6c29d96920 100644--- a/packages/sheets-drawing-ui/src/controllers/__tests__/sheet-drawing-update.controller.spec.ts+++ b/packages/sheets-drawing-ui/src/controllers/__tests__/sheet-drawing-update.controller.spec.ts@@ -152,8 +152,8 @@ describe('SheetDrawingUpdateController', () => {unitId: 'unit-1',subUnitId: 'sheet-1',backgroundImage: {- source: imageParam.base64Cache,- imageSourceType: ImageSourceType.BASE64,+ source: imageParam.source,+ imageSourceType: imageParam.imageSourceType,},});diff --git a/packages/sheets-drawing-ui/src/controllers/sheet-drawing-update.controller.ts b/packages/sheets-drawing-ui/src/controllers/sheet-drawing-update.controller.tsindex 9a97d86b44..ae0ab87a00 100644--- a/packages/sheets-drawing-ui/src/controllers/sheet-drawing-update.controller.ts+++ b/packages/sheets-drawing-ui/src/controllers/sheet-drawing-update.controller.ts@@ -240,14 +240,13 @@ export class SheetDrawingUpdateController extends Disposable implements IRenderM}const { unitId, subUnitId } = this._getUnitInfo();- const source = imageParam.base64Cache || imageParam.source;- const scale = getWorksheetBackgroundImageScale(source);+ const scale = getWorksheetBackgroundImageScale(imageParam.base64Cache || imageParam.source);return this._commandService.executeCommand(SetWorksheetBackgroundImageCommand.id, {unitId,subUnitId,backgroundImage: {- source,- imageSourceType: imageParam.base64Cache ? ImageSourceType.BASE64 : imageParam.imageSourceType,+ source: imageParam.source,+ imageSourceType: imageParam.imageSourceType,...scale,},});diff --git a/packages/sheets-drawing-ui/src/menu/schema.ts b/packages/sheets-drawing-ui/src/menu/schema.tsindex ffee0f6253..7a44b483da 100644--- a/packages/sheets-drawing-ui/src/menu/schema.ts+++ b/packages/sheets-drawing-ui/src/menu/schema.ts@@ -56,8 +56,8 @@ export const menuSchema: MenuSchemaType = {[RibbonPosition.VIEW]: {[RibbonViewGroup.DISPLAY]: {[WORKSHEET_BACKGROUND_IMAGE_MENU_ID]: {- order: 3,- gridLayout: { row: 1, column: 3, rowSpan: 2, showLabel: true },+ order: 0.5,+ gridLayout: { row: 1, column: 2, rowSpan: 2, showLabel: true },menuItemFactory: WorksheetBackgroundImageMenuFactory,[AddWorksheetBackgroundImageCommand.id]: {order: 0,