aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/Annotation.tsx
diff options
context:
space:
mode:
authorandrewdkim <adkim414@gmail.com>2019-10-02 15:59:56 -0400
committerandrewdkim <adkim414@gmail.com>2019-10-02 15:59:56 -0400
commit00416cdb70aa8dd9698972ab0df8ca0a6c8575f9 (patch)
treefb446dbdf8ff37d58aaa92019ae3edf72409900b /src/client/views/pdf/Annotation.tsx
parent2f09822358dba784ec26d5707423b4025096ee45 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into animationtimeline_two
Diffstat (limited to 'src/client/views/pdf/Annotation.tsx')
-rw-r--r--src/client/views/pdf/Annotation.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/pdf/Annotation.tsx b/src/client/views/pdf/Annotation.tsx
index a9fa883c8..3ed85f6a5 100644
--- a/src/client/views/pdf/Annotation.tsx
+++ b/src/client/views/pdf/Annotation.tsx
@@ -85,7 +85,15 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
@action
onPointerDown = async (e: React.PointerEvent) => {
- if (e.button === 0) {
+ if (e.button === 2 || e.ctrlKey) {
+ PDFMenu.Instance.Status = "annotation";
+ PDFMenu.Instance.Delete = this.deleteAnnotation.bind(this);
+ PDFMenu.Instance.Pinned = false;
+ PDFMenu.Instance.AddTag = this.addTag.bind(this);
+ PDFMenu.Instance.PinToPres = this.pinToPres;
+ PDFMenu.Instance.jumpTo(e.clientX, e.clientY, true);
+ }
+ else if (e.button === 0) {
let targetDoc = await Cast(this.props.document.target, Doc);
if (targetDoc) {
let context = await Cast(targetDoc.targetContext, Doc);
@@ -96,14 +104,6 @@ class RegionAnnotation extends React.Component<IRegionAnnotationProps> {
}
}
}
- if (e.button === 2) {
- PDFMenu.Instance.Status = "annotation";
- PDFMenu.Instance.Delete = this.deleteAnnotation.bind(this);
- PDFMenu.Instance.Pinned = false;
- PDFMenu.Instance.AddTag = this.addTag.bind(this);
- PDFMenu.Instance.PinToPres = this.pinToPres;
- PDFMenu.Instance.jumpTo(e.clientX, e.clientY, true);
- }
}
addTag = (key: string, value: string): boolean => {