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
refactor: add plugin type to image plugin (#2010)
Ran Luod7b4772b964f
diff --git a/packages/engine-render/src/components/sheets/sheet-skeleton.ts b/packages/engine-render/src/components/sheets/sheet-skeleton.tsindex 3715c601d4..a461d7a2b4 100644--- a/packages/engine-render/src/components/sheets/sheet-skeleton.ts+++ b/packages/engine-render/src/components/sheets/sheet-skeleton.ts@@ -1180,6 +1180,7 @@ export class SpreadsheetSkeleton extends Skeleton {* the text content of this cell can be drawn to both sides, not limited by the cell's width.* Overflow on the left or right is aligned according to the text's horizontal alignment.*/+ // eslint-disable-next-line complexityprivate _calculateOverflowCell(row: number, column: number, docsConfig: IFontCacheItem) {// wrap and angle handlerconst { documentSkeleton, vertexAngle = 0, centerAngle = 0, horizontalAlign, wrapStrategy } = docsConfig;diff --git a/packages/image/src/plugin.ts b/packages/image/src/plugin.tsindex fe8c57dcf2..94d83fbdc2 100644--- a/packages/image/src/plugin.ts+++ b/packages/image/src/plugin.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { DEFAULT_DOCUMENT_SUB_COMPONENT_ID, Plugin } from '@univerjs/core';+import { DEFAULT_DOCUMENT_SUB_COMPONENT_ID, Plugin, UniverInstanceType } from '@univerjs/core';import type { Dependency, Injector } from '@wendellhu/redi';import { ImageLoadController } from './controllers/image.load.controller';@@ -27,6 +27,8 @@ const PLUGIN_NAME = 'IMAGE_PLUGIN';export class UniverImagePlugin extends Plugin {static override pluginName = PLUGIN_NAME;+ static override type = UniverInstanceType.UNIVER;+constructor(_config: undefined,protected _injector: Injector