aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MarqueeAnnotator.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-15 13:19:24 -0400
committerbobzel <zzzman@gmail.com>2021-03-15 13:19:24 -0400
commit363b73726523caff1e5f047287c7fdb242b39e20 (patch)
tree7680e88640c34edd06a882f911b89d71f4e02ce4 /src/client/views/MarqueeAnnotator.tsx
parentded69655dabf97c76f97271e7da8e77e3f33ec25 (diff)
fixed scrolling to annotations and pointerevents on webBox (when an annotation was selected so you can drag out a marquee)
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
-rw-r--r--src/client/views/MarqueeAnnotator.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx
index c43dd6ba8..59500070c 100644
--- a/src/client/views/MarqueeAnnotator.tsx
+++ b/src/client/views/MarqueeAnnotator.tsx
@@ -30,7 +30,7 @@ export interface MarqueeAnnotatorProps {
annotationLayer: HTMLDivElement;
addDocument: (doc: Doc) => boolean;
getPageFromScroll?: (top: number) => number;
- finishMarquee: () => void;
+ finishMarquee: (x?: number, y?: number) => void;
anchorMenuClick?: (anchor: Doc) => void;
}
@observer
@@ -204,10 +204,11 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> {
if (AnchorMenu.Instance.Highlighting) {// when highlighter has been toggled when menu is pinned, we auto-highlight immediately on mouse up
this.highlight("rgba(245, 230, 95, 0.75)", false); // yellowish highlight color for highlighted text (should match AnchorMenu's highlight color)
}
+ this.props.finishMarquee();
} else {
runInAction(() => this._width = this._height = 0);
+ this.props.finishMarquee(e.clientX, e.clientY);
}
- this.props.finishMarquee();
}
render() {