diff options
author | bobzel <zzzman@gmail.com> | 2021-09-28 14:31:19 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-28 14:31:19 -0400 |
commit | 4dd8a5a4110106a607156d20b5315f28e8a2c163 (patch) | |
tree | b3ceb02c860c74c2d1d12629105c4d4536187d3f /src | |
parent | 2a6385ad330ac4d7caf6b23e64cb13b7546ea44a (diff) |
only hover ink if its selected
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/InkingStroke.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index efe2e5f66..60dc7b9f7 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -83,10 +83,11 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume this._properties._controlButton = true; InkStrokeProperties.Instance && (InkStrokeProperties.Instance._currentPoint = -1); this._handledClick = true; // mark the double-click pseudo pointerevent so we can block the real mouse event from propagating to DocumentView - } else { - this._nearestT && this._nearestSeg && InkStrokeProperties.Instance?.addPoints(this._nearestT, this._nearestSeg, this.inkScaledData().inkData); } - }), this._properties?._controlButton, this._properties?._controlButton + }), this._properties?._controlButton, this._properties?._controlButton, + () => { + this._nearestT && this._nearestSeg !== undefined && InkStrokeProperties.Instance?.addPoints(this._nearestT, this._nearestSeg, this.inkScaledData().inkData); + } ); } } @@ -236,7 +237,7 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps, InkDocume onPointerLeave={action(e => this._nearestScrPt = undefined )} - onPointerMove={this.onPointerOver} + onPointerMove={this.props.isSelected() ? this.onPointerOver : undefined} onPointerDown={this.onPointerDown} onClick={this.onClick} onContextMenu={() => { |