diff options
author | bob <bcz@cs.brown.edu> | 2019-09-13 12:30:20 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-13 12:30:20 -0400 |
commit | f508d5987e91e8297258905d8e8c9dfc405c50e9 (patch) | |
tree | 550b1a51f74372bd105ce1813d053f321432f48a /src/client/views/nodes/DocumentView.tsx | |
parent | 3665945fd4ef1b1dfc300f9188fd358df76e38b3 (diff) |
changed link following to follow links that aren't shown that don't have an anchor first. changed text pointerevents when its a button.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 0a1367b56..0816cb813 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -354,7 +354,9 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu } else if (linkedDocs.length) { SelectionManager.DeselectAll(); - let first = linkedDocs.filter(d => Doc.AreProtosEqual(d.anchor1 as Doc, this.props.Document)); + let first = linkedDocs.filter(d => Doc.AreProtosEqual(d.anchor1 as Doc, this.props.Document) && !d.anchor1anchored); + let firstUnshown = first.filter(d => DocumentManager.Instance.getDocumentViews(d.anchor2 as Doc).length === 0); + if (firstUnshown.length) first = [firstUnshown[0]]; let linkedFwdDocs = first.length ? [first[0].anchor2 as Doc, first[0].anchor1 as Doc] : [expandedDocs[0], expandedDocs[0]]; // @TODO: shouldn't always follow target context |