diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-04 11:55:12 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-06-04 11:55:12 -0400 |
| commit | 17a0657482a2704790b9d78ad0444fe5e6efdf1d (patch) | |
| tree | 0beb0c0e355e787bf3d86c93c6d41dccae049b02 /src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | |
| parent | 19f0a2f1757991d4aa3a4c5329902afe15d0f050 (diff) | |
| parent | f2c4b71abc29d3416944eee539041ff324632417 (diff) | |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 61de83f57..7af4f1682 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -44,14 +44,20 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo let y1 = NumCast(a.y) + (BoolCast(a.isMinimized, false) ? 5 : NumCast(a.height) / NumCast(a.zoomBasis, 1) / 2); let x2 = NumCast(b.x) + (BoolCast(b.isMinimized, false) ? 5 : NumCast(b.width) / NumCast(b.zoomBasis, 1) / 2); let y2 = NumCast(b.y) + (BoolCast(b.isMinimized, false) ? 5 : NumCast(b.height) / NumCast(b.zoomBasis, 1) / 2); + let text = ""; + this.props.LinkDocs.map(l => text += StrCast(l.title) + ", "); + text = text.substr(0, text.length - 2); return ( <> - <line key={"linkLine"} className="collectionfreeformlinkview-linkLine" - style={{ strokeWidth: `${35 * l.length / 2}` }} + <line key="linkLine" className="collectionfreeformlinkview-linkLine" + style={{ strokeWidth: `${2 * l.length / 2}` }} x1={`${x1}`} y1={`${y1}`} x2={`${x2}`} y2={`${y2}`} /> - <circle key={"linkCircle"} className="collectionfreeformlinkview-linkCircle" - cx={(x1 + x2) / 2} cy={(y1 + y2) / 2} r={8} onPointerDown={this.onPointerDown} /> + {/* <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}`}> + {text} + </text> </> ); } |
