aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-11-09 15:04:28 -0500
committerbobzel <zzzman@gmail.com>2020-11-09 15:04:28 -0500
commitce5512a3fdd451ad47263f896a9e855229133eaf (patch)
tree3e6d8bd391b8e465282cac7a5f6912fab0f900ac /src/client/views/DocumentDecorations.tsx
parentaba91357df33b49e9c09208a53b757ef8f8dc724 (diff)
added fullScreen alias option for opening documents so that opened document can have different scale than original. fixed pushpins to not toggle target if something must be panned/zoomed to show the target. fixed drag drop to ignore the document being dragged properly when dropping (which prevented a document over a collection from being dropped on the colelction when move slightly).
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 4dcae8e60..63b99cd85 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -177,19 +177,17 @@ export class DocumentDecorations extends React.Component<{}, { value: string }>
const selectedDocs = SelectionManager.SelectedDocuments();
if (selectedDocs.length) {
if (e.ctrlKey) { // open an alias in a new tab with Ctrl Key
- const alias = Doc.MakeAlias(selectedDocs[0].props.Document);
- alias.context = undefined;
- //CollectionDockingView.Instance?.OpenFullScreen(selectedDocs[0]);
- CollectionDockingView.AddSplit(alias, "right");
+ selectedDocs[0].props.Document._fullScreenView = Doc.MakeAlias(selectedDocs[0].props.Document);
+ (selectedDocs[0].props.Document._fullScreenView as Doc).context = undefined;
+ CollectionDockingView.AddSplit(selectedDocs[0].props.Document._fullScreenView as Doc, "right");
} else if (e.shiftKey) { // open centered in a new workspace with Shift Key
const alias = Doc.MakeAlias(selectedDocs[0].props.Document);
alias.context = undefined;
alias.x = -alias[WidthSym]() / 2;
alias.y = -alias[HeightSym]() / 2;
- //CollectionDockingView.Instance?.OpenFullScreen(selectedDocs[0]);
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([alias], { title: "Tab for " + alias.title }), "right");
} else { // open same document in new tab
- CollectionDockingView.ToggleSplit(selectedDocs[0].props.Document, "right");
+ CollectionDockingView.ToggleSplit(Cast(selectedDocs[0].props.Document._fullScreenView, Doc, null) || selectedDocs[0].props.Document, "right");
}
}
}