From c26d63873e3dd4304088b84fa52bffcc78ca2896 Mon Sep 17 00:00:00 2001 From: Anika Ahluwalia Date: Tue, 29 Sep 2020 14:37:59 -0500 Subject: undo for linking --- src/client/util/DocumentManager.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/client/util') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 116883fcb..c40df1c13 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -11,6 +11,7 @@ import { SelectionManager } from './SelectionManager'; import { DocumentType } from '../documents/DocumentTypes'; import { TraceMobx } from '../../fields/util'; import { returnFalse } from '../../Utils'; +import { undoBatch } from './UndoManager'; export type CreateViewFunc = (doc: Doc, followLinkLocation: string, finished?: () => void) => void; @@ -219,6 +220,7 @@ export class DocumentManager { } } + @undoBatch public async FollowLink(link: Opt, doc: Doc, createViewFunc: CreateViewFunc, zoom = false, currentContext?: Doc, finished?: () => void, traverseBacklink?: boolean) { const linkDocs = link ? [link] : DocListCast(doc.links); SelectionManager.DeselectAll(); -- cgit v1.2.3-70-g09d2