aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/Page.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-08 10:54:53 -0400
committerbob <bcz@cs.brown.edu>2019-07-08 10:54:53 -0400
commit400c525875af607dd76d7ec46949fedc418caabf (patch)
tree3cfa74f4290cab9b4699a66a2be24d30c8b9fea9 /src/client/views/pdf/Page.tsx
parent1f1ca5f25803d2ba8f1c5afc4c6552388f722816 (diff)
fixed annotation dragging on PDFs. fixed panning after zooming on images.
Diffstat (limited to 'src/client/views/pdf/Page.tsx')
-rw-r--r--src/client/views/pdf/Page.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/pdf/Page.tsx b/src/client/views/pdf/Page.tsx
index 92f5390ae..49eac71c4 100644
--- a/src/client/views/pdf/Page.tsx
+++ b/src/client/views/pdf/Page.tsx
@@ -152,7 +152,7 @@ export default class Page extends React.Component<IPageProps> {
* start a drag event and create or put the necessary info into the drag event.
*/
@action
- startDrag = (e: PointerEvent): void => {
+ startDrag = (e: PointerEvent, ele: HTMLDivElement): void => {
e.preventDefault();
e.stopPropagation();
let thisDoc = this.props.parent.Document;
@@ -163,7 +163,7 @@ export default class Page extends React.Component<IPageProps> {
// create dragData and star tdrag
let dragData = new DragManager.AnnotationDragData(thisDoc, annotationDoc, targetDoc);
if (this._textLayer.current) {
- DragManager.StartAnnotationDrag([this._textLayer.current], dragData, e.pageX, e.pageY, {
+ DragManager.StartAnnotationDrag([ele], dragData, e.pageX, e.pageY, {
handlers: {
dragComplete: emptyFunction,
},