diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-15 21:41:04 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-15 21:41:04 -0400 |
| commit | db76556dd1f5c8e6c04a388f5b0f6a46f223efce (patch) | |
| tree | 9d4c53f073bd3cd64dc6fa32654eb47f2e746389 /src/client/views/MarqueeAnnotator.tsx | |
| parent | f9db6aa1059c6034adb41bc25f932ec5749e6aea (diff) | |
final cleanups to get scrolling to work smoothly for webbox's - sadly, does not work as well in Firefox, and even worse in Safari.
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index 59500070c..77ace7ddb 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -59,8 +59,8 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { this._startX = this._left = (this.props.down[0] - boundingRect.left) * (this.props.mainCont.offsetWidth / boundingRect.width); this._startY = this._top = (this.props.down[1] - boundingRect.top) * (this.props.mainCont.offsetHeight / boundingRect.height) + this.props.mainCont.scrollTop; this._height = this._width = 0; - document.addEventListener("pointermove", this.onSelectMove); - document.addEventListener("pointerup", this.onSelectEnd); + document.addEventListener("pointermove", this.onSelectMove, true); + document.addEventListener("pointerup", this.onSelectEnd, true); AnchorMenu.Instance.OnClick = (e: PointerEvent) => this.props.anchorMenuClick?.(this.highlight("rgba(173, 216, 230, 0.75)", true)); AnchorMenu.Instance.Highlight = this.highlight; @@ -91,8 +91,8 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { }); } componentWillUnmount() { - document.removeEventListener("pointermove", this.onSelectMove); - document.removeEventListener("pointerup", this.onSelectEnd); + document.removeEventListener("pointermove", this.onSelectMove, true); + document.removeEventListener("pointerup", this.onSelectEnd, true); } @undoBatch |
