From fc0c768a68f1ce413b44b00479bd5307ecc2383c Mon Sep 17 00:00:00 2001
From: bob <bcz@cs.brown.edu>
Date: Fri, 1 Feb 2019 17:24:24 -0500
Subject: added function to open document in rightmost split

---
 src/views/nodes/DocumentView.tsx | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/views/nodes/DocumentView.tsx')

diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx
index ae5712182..e77d4a274 100644
--- a/src/views/nodes/DocumentView.tsx
+++ b/src/views/nodes/DocumentView.tsx
@@ -314,6 +314,10 @@ export class DocumentView extends React.Component<DocumentViewProps> {
         }
     }
 
+    openRight = (e: React.MouseEvent): void => {
+        CollectionDockingView.AddRightSplit(this.props.Document);
+    }
+
     deleteClicked = (e: React.MouseEvent): void => {
         if (this.props.ContainingCollectionView instanceof CollectionFreeFormView) {
             this.props.ContainingCollectionView.removeDocument(this.props.Document)
@@ -356,6 +360,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
 
             ContextMenu.Instance.clearItems();
             ContextMenu.Instance.addItem({ description: "Full Screen", event: this.fullScreenClicked })
+            ContextMenu.Instance.addItem({ description: "Open Right", event: this.openRight })
             ContextMenu.Instance.addItem({ description: "Delete", event: this.deleteClicked })
             ContextMenu.Instance.displayMenu(e.pageX - 15, e.pageY - 15)
             SelectionManager.SelectDoc(this, e.ctrlKey);
-- 
cgit v1.2.3-70-g09d2

