aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPDFView.tsx
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-07-17 10:55:31 -0400
committerkimdahey <claire_kim1@brown.edu>2019-07-17 10:55:31 -0400
commitee385cd02a6ce99d59eb02a768bb587b566328e9 (patch)
treed3308280d3975a3fd090b0e548b268fb2ad20304 /src/client/views/collections/CollectionPDFView.tsx
parente3527a5f0334156a70b36980b8188ceb15ea5de3 (diff)
jumping to a region from a link now shows the whole region supposedly
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]());