diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-07-14 19:30:25 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-07-14 19:30:25 -0400 |
commit | d2d19d6e87111eb011b61ba352d0b39eb8ba2250 (patch) | |
tree | 459e3c991232e9d0c291bfc96e06127b344d3c9d /src | |
parent | 81d23dbd7b918fd1812b770960687bc8a12a0a34 (diff) |
fixed pdf annotation layer being off position and fixed linking to a region on a pdf
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionPDFView.tsx | 14 | ||||
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 1 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionPDFView.tsx b/src/client/views/collections/CollectionPDFView.tsx index c97443785..8ab360984 100644 --- a/src/client/views/collections/CollectionPDFView.tsx +++ b/src/client/views/collections/CollectionPDFView.tsx @@ -30,13 +30,13 @@ export class CollectionPDFView extends React.Component<FieldViewProps> { () => NumCast(this.props.Document.scrollY), () => { // let transform = this.props.ScreenToLocalTransform(); - if (this._buttonTray.current) { - // 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); - // console.log(scale); - } + // if (this._buttonTray.current) { + // 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); + // console.log(scale); + // } // console.log(this.props.Document[HeightSym]()); }, { fireImmediately: true } diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 8f5a356c8..e3a716b4b 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -236,6 +236,7 @@ export class Viewer extends React.Component<IViewerProps> { } } + @action makeAnnotationDocument = (sourceDoc: Doc | undefined, s: number, color: string): Doc => { let annoDocs: Doc[] = []; let mainAnnoDoc = Docs.Create.InstanceFromProto(new Doc(), "", {}); |