aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-10 17:02:04 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-10 17:02:04 -0400
commit5726d19a615385b0bcdf1e3a944056d31074edbb (patch)
treecc463245bb151cace4528c02f13b32315d8ab13d /src/client/views/nodes/DocumentView.tsx
parent9ec7cdfe8ee823afbf6eb80a0e586d99457a50d1 (diff)
made opening docs on right not create aliases. made clicking on an original document trigger replacing it with an alias.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index ebfc38a54..d2dabe7ec 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -305,11 +305,14 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
}, console.log);
func();
} else {
- const fullScreenAlias = Doc.MakeAlias(this.props.Document);
- if (StrCast(fullScreenAlias.layoutKey) !== "layout_fullScreen" && fullScreenAlias.layout_fullScreen) {
- fullScreenAlias.layoutKey = "layout_fullScreen";
- }
- UndoManager.RunInBatch(() => this.props.addDocTab(fullScreenAlias, "inTab"), "double tap");
+ UndoManager.RunInBatch(() => {
+ if (StrCast(this.props.Document.layoutKey) !== "layout_fullScreen" && this.props.Document.layout_fullScreen) {
+ const fullScreenAlias = Doc.MakeAlias(this.props.Document);
+ fullScreenAlias.layoutKey = "layout_fullScreen";
+ this.props.addDocTab(fullScreenAlias, "inTab");
+ this.props.addDocTab(this.props.Document, "inTab");
+ }
+ }, "double tap");
SelectionManager.DeselectAll();
Doc.UnBrushDoc(this.props.Document);
}