aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authoryipstanley <stanley_yip@brown.edu>2019-06-27 12:29:55 -0400
committeryipstanley <stanley_yip@brown.edu>2019-06-27 12:29:55 -0400
commit088eec96750fcbdfc30b42f24e8b57926441f4e5 (patch)
treeb6372e0bd71d5b7ae2afc17009f10e727d494280 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parenteb9448e37be256b1c554be68cfb43dd7da44b0af (diff)
pdf fixes
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 996032b1d..15185ecb0 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -239,8 +239,17 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
var scale = this.getLocalTransform().inverse().Scale;
const newPanX = Math.min((1 - 1 / scale) * this.nativeWidth, Math.max(0, panX));
const newPanY = Math.min((1 - 1 / scale) * this.nativeHeight, Math.max(0, panY));
- this.props.Document.panX = this.isAnnotationOverlay ? newPanX : panX;
- this.props.Document.panY = this.isAnnotationOverlay ? newPanY : panY;
+ // this.props.Document.panX = this.isAnnotationOverlay ? newPanX : panX;
+ // this.props.Document.panY = this.isAnnotationOverlay ? newPanY : panY;
+ this.props.Document.panX = panX;
+ if (this.props.Document.scrollY) {
+ this.props.Document.scrollY = panY;
+ this.props.Document.panY = panY;
+ }
+ else {
+
+ this.props.Document.panY = panY;
+ }
}
@action