diff options
author | Sam Wilkins <samuel_wilkins@brown.edu> | 2019-07-16 12:06:25 -0400 |
---|---|---|
committer | Sam Wilkins <samuel_wilkins@brown.edu> | 2019-07-16 12:06:25 -0400 |
commit | e51cfce53ea32047bec1fb72cebcc095c02c84a5 (patch) | |
tree | bf8f53ac7e7f4b140bee1b88d83fe8ccbc139623 /src/client/views/nodes/LinkMenuItem.tsx | |
parent | 533c48010ca668a944962bd61cd65115fc5a6fa6 (diff) | |
parent | f59e4c19bb759c9179157744bbcb46ff578351d1 (diff) |
merged with master
Diffstat (limited to 'src/client/views/nodes/LinkMenuItem.tsx')
-rw-r--r-- | src/client/views/nodes/LinkMenuItem.tsx | 5 |
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); } |