diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-04 02:47:49 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-04 02:47:49 +0800 |
commit | 5372e9b221aa72f7dfa22121ce8a4d85573da8cf (patch) | |
tree | 762c1d86b721528cdc43db3f49b8f9fdd1ad60d1 /src/client/views/nodes/PresBox.tsx | |
parent | 7520040052b0943bc5c80d3754335eb869793eb1 (diff) |
reset old width
because default width for doc is 400 so max does not work
Diffstat (limited to 'src/client/views/nodes/PresBox.tsx')
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 04eda8b90..190af34b9 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -322,10 +322,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> // Handles the setting of presCollection if (includesDoc) { //Case 1: Pres collection should not change as it is already the same - console.log(1); } else if (tab !== undefined) { // Case 2: Pres collection should update - console.log(2); this.layoutDoc.presCollection = srcContext; } const presStatus = this.rootDoc.presStatus; @@ -352,10 +350,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> if (activeItem.openDocument) { openInTab(); } else if (curDoc.presMovement === PresMovement.Pan && targetDoc) { - await DocumentManager.Instance.jumpToDocument(targetDoc, false, openInTab, srcContext, undefined, undefined, undefined, includesDoc ? undefined : resetSelection); // documents open in new tab instead of on right + await DocumentManager.Instance.jumpToDocument(targetDoc, false, openInTab, srcContext, undefined, undefined, undefined, includesDoc || tab ? undefined : resetSelection); // documents open in new tab instead of on right } else if ((curDoc.presMovement === PresMovement.Zoom || curDoc.presMovement === PresMovement.Jump) && targetDoc) { //awaiting jump so that new scale can be found, since jumping is async - await DocumentManager.Instance.jumpToDocument(targetDoc, true, openInTab, srcContext, undefined, undefined, undefined, includesDoc ? undefined : resetSelection); // documents open in new tab instead of on right + await DocumentManager.Instance.jumpToDocument(targetDoc, true, openInTab, srcContext, undefined, undefined, undefined, includesDoc || tab ? undefined : resetSelection); // documents open in new tab instead of on right } // After navigating to the document, if it is added as a presPinView then it will // adjust the pan and scale to that of the pinView when it was added. |