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 | |
| parent | 2c4026368078e2dc856c1cf4f8fe375cd30fbcdd (diff) | |
| parent | 3020cfcf20d187c976a7f386a95bec0c41cba06b (diff) | |
Merge branch 'master' into cont_menu_ui
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/DocumentManager.ts | 6 | ||||
| -rw-r--r-- | src/client/util/SearchUtil.ts | 3 |
2 files changed, 7 insertions, 2 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); diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts index e8eb70837..28ec8ca14 100644 --- a/src/client/util/SearchUtil.ts +++ b/src/client/util/SearchUtil.ts @@ -20,6 +20,7 @@ export namespace SearchUtil { export async function GetAliasesOfDocument(doc: Doc): Promise<Doc[]> { const proto = await Doc.GetT(doc, "proto", Doc, true); const protoId = (proto || doc)[Id]; - return Search(`{!join from=id to=proto_i}id:${protoId}`, true); + return Search(`proto_i:"${protoId}"`, true); + // return Search(`{!join from=id to=proto_i}id:${protoId}`, true); } }
\ No newline at end of file |
