diff options
| author | bob <bcz@cs.brown.edu> | 2020-01-06 14:06:16 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-01-06 14:06:16 -0500 |
| commit | d622486b343e69640dd749d124f6c2da9850dc10 (patch) | |
| tree | 31018db731ae146c700ebc61a49459177245776d /src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | |
| parent | 66b24b9d75ff2e90a15de2c81270b154efc7d3ea (diff) | |
maded link dot anchors update whenever they are moved. made text box collections always appear.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 5e4b4fd27..059393142 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -66,9 +66,12 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo apt.point.x, apt.point.y); const pt1 = [apt.point.x, apt.point.y]; const pt2 = [bpt.point.x, bpt.point.y]; - return (<line key="linkLine" className="collectionfreeformlinkview-linkLine" - style={{ opacity: this._opacity }} - x1={`${pt1[0]}`} y1={`${pt1[1]}`} - x2={`${pt2[0]}`} y2={`${pt2[1]}`} />); + let aActive = this.props.A.isSelected() || Doc.IsBrushed(this.props.A.props.Document); + let bActive = this.props.A.isSelected() || Doc.IsBrushed(this.props.A.props.Document); + return !aActive && !bActive ? (null) : + <line key="linkLine" className="collectionfreeformlinkview-linkLine" + style={{ opacity: this._opacity }} + x1={`${pt1[0]}`} y1={`${pt1[1]}`} + x2={`${pt2[0]}`} y2={`${pt2[1]}`} />; } }
\ No newline at end of file |
