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(docs): insert image after table (#3719)
Ran Luo942dc4e466fa
diff --git a/packages/docs-drawing-ui/src/views/menu/image.menu.ts b/packages/docs-drawing-ui/src/views/menu/image.menu.tsindex bc51aef51f..bdb23356bf 100644--- a/packages/docs-drawing-ui/src/views/menu/image.menu.ts+++ b/packages/docs-drawing-ui/src/views/menu/image.menu.ts@@ -14,12 +14,12 @@* limitations under the License.*/+import type { IAccessor } from '@univerjs/core';import { IUniverInstanceService, UniverInstanceType } from '@univerjs/core';import { DocSelectionManagerService } from '@univerjs/docs';-import { getMenuHiddenObservable, type IMenuItem, MenuItemType } from '@univerjs/ui';+import { getMenuHiddenObservable, type IMenuItem, MenuItemType } from '@univerjs/ui';import { Observable } from 'rxjs';-import type { IAccessor } from '@univerjs/core';import { InsertDocImageCommand } from '../../commands/commands/insert-image.command';export const ImageUploadIcon = 'addition-and-subtraction-single';@@ -43,7 +43,7 @@ const getDisableWhenSelectionInTableObservable = (accessor: IAccessor) => {if (tables && tables.length) {if (tables.some((table) => {const { startIndex, endIndex } = table;- return (startOffset >= startIndex && startOffset <= endIndex) || (endOffset >= startIndex && endOffset <= endIndex);+ return (startOffset >= startIndex && startOffset < endIndex) || (endOffset >= startIndex && endOffset < endIndex);})) {subscriber.next(true);return;