aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LinkMenuItem.tsx
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-07-16 12:06:38 -0400
committeryipstanley <stanley_yip@brown.edu>2019-07-16 12:06:38 -0400
commitaa32601952f9387d85d6f109aef9ad39396d3f98 (patch)
treea3d8d0d6407b26049b5c49468f5102ca7e15144a /src/client/views/nodes/LinkMenuItem.tsx
parent78faa73f1d4a315a3d76613bdcbb894e2428ee10 (diff)
parente51cfce53ea32047bec1fb72cebcc095c02c84a5 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/LinkMenuItem.tsx')
-rw-r--r--src/client/views/nodes/LinkMenuItem.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/LinkMenuItem.tsx b/src/client/views/nodes/LinkMenuItem.tsx
index 9728671c0..6a18a4e7b 100644
--- a/src/client/views/nodes/LinkMenuItem.tsx
+++ b/src/client/views/nodes/LinkMenuItem.tsx
@@ -7,7 +7,7 @@ import { undoBatch } from "../../util/UndoManager";
import './LinkMenu.scss';
import React = require("react");
import { Doc } from '../../../new_fields/Doc';
-import { StrCast, Cast, BoolCast, FieldValue } from '../../../new_fields/Types';
+import { StrCast, Cast, BoolCast, FieldValue, NumCast } from '../../../new_fields/Types';
import { observable, action } from 'mobx';
import { LinkManager } from '../../util/LinkManager';
import { DragLinkAsDocument } from '../../util/DragManager';
@@ -38,7 +38,8 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {
jumpToDoc = pdfDoc;
}
if (DocumentManager.Instance.getDocumentView(jumpToDoc)) {
- DocumentManager.Instance.jumpToDocument(jumpToDoc, e.altKey);
+ let self = this;
+ DocumentManager.Instance.jumpToDocument(jumpToDoc, e.altKey, undefined, undefined, NumCast((this.props.destinationDoc === self.props.linkDoc.anchor2 ? self.props.linkDoc.anchor2Page : self.props.linkDoc.anchor1Page)));
} else {
CollectionDockingView.Instance.AddRightSplit(jumpToDoc, undefined);
}