diff options
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 |
