diff options
author | tschicke-brown <tyler_schicke@brown.edu> | 2019-05-21 18:36:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 18:36:47 -0400 |
commit | d8e75e672f1384dc68af1f63aabd68d8b6820adb (patch) | |
tree | 7d55626e1cd78722c9ec297f9efce8de0f6c7265 /src/client/util/DocumentManager.ts | |
parent | 2c4026368078e2dc856c1cf4f8fe375cd30fbcdd (diff) | |
parent | 3020cfcf20d187c976a7f386a95bec0c41cba06b (diff) |
Merge branch 'master' into cont_menu_ui
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 82776ff59..cf470a015 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -116,7 +116,7 @@ export class DocumentManager { @undoBatch public jumpToDocument = async (docDelegate: Doc, makeCopy: boolean = true, dockFunc?: (doc: Doc) => void): Promise<void> => { - let doc = docDelegate.proto ? docDelegate.proto : docDelegate; + let doc = Doc.GetProto(docDelegate); const page = NumCast(doc.page, undefined); const contextDoc = await Cast(doc.annotationOn, Doc); if (contextDoc) { @@ -130,18 +130,22 @@ export class DocumentManager { if (makeCopy) { if (!contextDoc) { const actualDoc = Doc.MakeAlias(docDelegate); + actualDoc.libraryBrush = true; (dockFunc || CollectionDockingView.Instance.AddRightSplit)(actualDoc); } } else { + docView.props.Document.libraryBrush = true; docView.props.focus(docView.props.Document); } } else { if (!contextDoc) { const actualDoc = Doc.MakeAlias(docDelegate); + (dockFunc || CollectionDockingView.Instance.AddRightSplit)(actualDoc); } else { let contextView = DocumentManager.Instance.getDocumentView(contextDoc); + docDelegate.libraryBrush = true; if (contextView) { contextDoc.panTransformType = "Ease"; contextView.props.focus(contextDoc); |