aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
diff options
context:
space:
mode:
authorFawn <fangrui_tong@brown.edu>2019-06-20 11:26:33 -0400
committerFawn <fangrui_tong@brown.edu>2019-06-20 11:26:33 -0400
commit73f03785f938542a91b28b35043f2feda2bc1432 (patch)
tree0be50d5b010de4f5fe00ae834dc0caf8b41e2a3f /src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
parentc5e401cb0a7fec2279ceecbc8d1429dcdd2f04b9 (diff)
merge
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
index bde68001b..3c2ccecfc 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
@@ -167,12 +167,16 @@ export class CollectionFreeFormLinksView extends React.Component<CollectionViewP
let unique: Set<{ sourceView: DocumentView, targetView: DocumentView, linkDoc: Doc }> = new Set();
connections.forEach(c => {
+
// let match1Index = unique.findIndex(u => (c.anchor1View === u.sourceView) && (c.anchor2View === u.targetView));
// let match2Index = unique.findIndex(u => (c.anchor1View === u.targetView) && (c.anchor2View === u.sourceView));
let match1 = unique.has({ sourceView: c.anchor1View, targetView: c.anchor2View, linkDoc: c.linkDoc });
let match2 = unique.has({ sourceView: c.anchor2View, targetView: c.anchor1View, linkDoc: c.linkDoc });
let sameContext = c.anchor1View.props.ContainingCollectionView === c.anchor2View.props.ContainingCollectionView;
+ // console.log("CONNECTION", StrCast(c.anchor1View.props.Document.title), StrCast(c.anchor2View.props.Document.title), match1, match2);
+
+
// if in same context, push if docview pair does not already exist
// else push both directions of pair
if (sameContext) {