diff options
author | Anika Ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-29 14:37:59 -0500 |
---|---|---|
committer | Anika Ahluwalia <anika.ahluwalia@gmail.com> | 2020-09-29 14:37:59 -0500 |
commit | c26d63873e3dd4304088b84fa52bffcc78ca2896 (patch) | |
tree | 5e5a047e647b9cd50f3472f45cefd0e4fcff81ba /src/client/util/DocumentManager.ts | |
parent | d111790eb254ae49cf31b6d3efd344700ad5e2d4 (diff) |
undo for linking
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 2 |
1 files changed, 2 insertions, 0 deletions
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: Doc, createViewFunc: CreateViewFunc, zoom = false, currentContext?: Doc, finished?: () => void, traverseBacklink?: boolean) { const linkDocs = link ? [link] : DocListCast(doc.links); SelectionManager.DeselectAll(); |