aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPDFView.tsx
diff options
context:
space:
mode:
authorStanley Yip <33562077+yipstanley@users.noreply.github.com>2019-07-17 14:56:52 +0000
committerGitHub <noreply@github.com>2019-07-17 14:56:52 +0000
commit1610f9e7bfac3de61d3b6de108a0664e1266e5ba (patch)
tree78cb59565eb78955e089a11d96011da79e0c81c7 /src/client/views/collections/CollectionPDFView.tsx
parentba25d48d52f6db6021f5149e39021f651af22317 (diff)
parent253813f3ed75c5bbc08f32a1e822ff922bfe185b (diff)
Merge pull request #212 from browngraphicslab/small_fix_0716
fixed undo on panning
Diffstat (limited to 'src/client/views/collections/CollectionPDFView.tsx')
-rw-r--r--src/client/views/collections/CollectionPDFView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionPDFView.tsx b/src/client/views/collections/CollectionPDFView.tsx
index 8ab360984..781692eef 100644
--- a/src/client/views/collections/CollectionPDFView.tsx
+++ b/src/client/views/collections/CollectionPDFView.tsx
@@ -1,6 +1,6 @@
import { action, IReactionDisposer, observable, reaction } from "mobx";
import { observer } from "mobx-react";
-import { WidthSym } from "../../../new_fields/Doc";
+import { WidthSym, HeightSym } from "../../../new_fields/Doc";
import { Id } from "../../../new_fields/FieldSymbols";
import { NumCast } from "../../../new_fields/Types";
import { emptyFunction } from "../../../Utils";
@@ -34,7 +34,7 @@ export class CollectionPDFView extends React.Component<FieldViewProps> {
// console.log(this._buttonTray.current.offsetHeight);
// console.log(NumCast(this.props.Document.scrollY));
let scale = this.nativeWidth() / this.props.Document[WidthSym]();
- this.props.Document.panY = NumCast(this.props.Document.scrollY);
+ this.props.Document.panY = NumCast(this.props.Document.scrollY) - this.props.Document[HeightSym]();
// console.log(scale);
// }
// console.log(this.props.Document[HeightSym]());