diff options
author | bob <bcz@cs.brown.edu> | 2020-01-07 15:30:12 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-07 15:30:12 -0500 |
commit | 7d6dd8470384d345771ed67c88c9b15e2b333a6b (patch) | |
tree | d9a78097dcbb7e9f94a56222ca385e43d0136c36 /src | |
parent | e216c2d45b59c708953f8e50876f388f1869c813 (diff) |
fix for link line opacity
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index 1382b01d3..178a5bcdc 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -22,7 +22,7 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo _anchorDisposer: IReactionDisposer | undefined; @action componentDidMount() { - this._anchorDisposer = reaction(() => [this.props.A.props.ScreenToLocalTransform(), this.props.B.props.ScreenToLocalTransform()], + this._anchorDisposer = reaction(() => [this.props.A.props.ScreenToLocalTransform(), this.props.B.props.ScreenToLocalTransform(), this.props.A.isSelected() || Doc.IsBrushed(this.props.A.props.Document), this.props.A.isSelected() || Doc.IsBrushed(this.props.A.props.Document)], action(() => { setTimeout(action(() => this._opacity = 1), 0); // since the render code depends on querying the Dom through getBoudndingClientRect, we need to delay triggering render() setTimeout(action(() => this._opacity = 0.05), 750); // this will unhighlight the link line. @@ -97,7 +97,7 @@ export class CollectionFreeFormLinkView extends React.Component<CollectionFreeFo 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 }} + style={{ opacity: this._opacity, strokeDasharray: "2 2" }} x1={`${pt1[0]}`} y1={`${pt1[1]}`} x2={`${pt2[0]}`} y2={`${pt2[1]}`} />; } |