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
feat(sheets-drawing-ui): add updateFloatDomProps (#5517)
WEI ZHANGbb051e29748c
diff --git a/packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.ts b/packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.tsindex 70fbcff927..f5379c336c 100644--- a/packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.ts+++ b/packages/sheets-drawing-ui/src/services/canvas-float-dom-manager.service.ts@@ -558,6 +558,19 @@ export class SheetCanvasFloatDomManagerService extends Disposable {//# endregion}+ updateFloatDomProps(unitId: string, subUnitId: string, id: string, props: Record<string, any>) {+ const info = this._domLayerInfoMap.get(id);+ const renderObject = this._getSceneAndTransformerByDrawingSearch(unitId);+ if (info && renderObject) {+ const { scene } = renderObject;+ const rectShapeKey = getDrawingShapeKeyByDrawingSearch({ unitId, subUnitId, drawingId: id });+ const rectShape = scene.getObject(rectShapeKey);+ if (rectShape && rectShape instanceof Rect) {+ rectShape.setProps(props);+ }+ }+ }+private _getPosition(position: IPosition, unitId: string): Nullable<ISheetDrawingPosition> {const { startX, endX, startY, endY } = position;const selectionRenderService = this._renderManagerService.getRenderById(unitId)?.with(ISheetSelectionRenderService);