diff options
author | bobzel <zzzman@gmail.com> | 2020-10-06 11:07:28 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-10-06 11:07:28 -0400 |
commit | 83aaea5320257ce15d68a5299c00977684ddab8e (patch) | |
tree | cdb96cd3b4407684669c88c82e753173875d26e2 /src/client/util/DocumentManager.ts | |
parent | 9c4701f8a8214544a0e1e6b31887d393e8ad344f (diff) |
restored ability to open document that has been moved from another document's annotation overlay
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 2ca29cb7e..e2518d05f 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -193,11 +193,13 @@ export class DocumentManager { if (retryDocView) { // we found the target in the context retryDocView.props.focus(targetDoc, willZoom, undefined, focusAndFinish); // focus on the target in the context highlight(); - } - if (delay > 2500) { + } else if (delay > 1500) { // we didn't find the target, so it must have moved out of the context. Go back to just creating it. if (closeContextIfNotFound) targetDocContextView.props.removeDocument?.(targetDocContextView.props.Document); - // targetDoc.layout && createViewFunc(Doc.BrushDoc(targetDoc), finished); // create a new view of the target + if (targetDoc.layout) { + Doc.SetInPlace(targetDoc, "annotationOn", undefined, false); + createViewFunc(Doc.BrushDoc(targetDoc), finished); // create a new view of the target + } } else { setTimeout(() => findView(delay + 250), 250); } |