From f362dbfc237536c6c4a8c6d088c3dc818080f7c2 Mon Sep 17 00:00:00 2001
From: Fawn <fangrui_tong@brown.edu>
Date: Wed, 19 Jun 2019 12:50:58 -0400
Subject: both tail ends of a cut link appear on hover/focus of an anchor

---
 .../CollectionFreeFormLinkView.tsx                  | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
index 4d477454b..f995a35e3 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx
@@ -18,8 +18,6 @@ export interface CollectionFreeFormLinkViewProps {
 
     sourceView: DocumentView;
     targetView: DocumentView;
-    sameContext: boolean;
-    addDocTab: (document: Doc, where: string) => void;
 }
 
 @observer
@@ -44,12 +42,6 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
     //     }
     // }
 
-    followButton = (e: React.PointerEvent): void => {
-        // TODO: would be nicer to open docview in context
-        e.stopPropagation();
-        console.log("follow");
-        this.props.addDocTab(this.props.targetView.props.Document, "onRight");
-    }
 
     render() {
         // let l = this.props.LinkDocs;
@@ -62,25 +54,14 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo
 
         let x2 = NumCast(a2.Document.x) + (BoolCast(a2.Document.isMinimized, false) ? 5 : NumCast(a2.Document.width) / NumCast(a2.Document.zoomBasis, 1) / 2);
         let y2 = NumCast(a2.Document.y) + (BoolCast(a2.Document.isMinimized, false) ? 5 : NumCast(a2.Document.height) / NumCast(a2.Document.zoomBasis, 1) / 2);
-        if (!this.props.sameContext) {
-            x2 = x1 + 300;
-            y2 = y1 - 300;
-        }
-
-        let containing = "";
-        if (this.props.targetView.props.ContainingCollectionView) {
-            containing = StrCast(this.props.targetView.props.ContainingCollectionView.props.Document.title);
-        }
 
-        let text = "link to " + StrCast(this.props.targetView.props.Document.title) + (containing === "" ? "" : (" in the context of " + containing));
         return (
             <>
                 <line className="collectionfreeformlinkview-linkLine"
                     style={{ strokeWidth: `${2 * 1 / 2}` }}
                     x1={`${x1}`} y1={`${y1}`}
                     x2={`${x2}`} y2={`${y2}`} />
-                {!this.props.sameContext ? <circle className="collectionfreeformlinkview-linkCircle" cx={x2} cy={y2} r={20} onPointerDown={this.followButton}></circle> : <></>}
-                {!this.props.sameContext ? <text textAnchor="middle" className="collectionfreeformlinkview-linkText" x={`${x2}`} y={`${y2}`}> {text}</text> : <></>}
+
                 {/* <circle key="linkCircle" className="collectionfreeformlinkview-linkCircle"
                     cx={(x1 + x2) / 2} cy={(y1 + y2) / 2} r={8} onPointerDown={this.onPointerDown} /> */}
                 {/* <text key="linkText" textAnchor="middle" className="collectionfreeformlinkview-linkText" x={`${(x1 + x2) / 2}`} y={`${(y1 + y2) / 2}`}>
-- 
cgit v1.2.3-70-g09d2

