From ad0152df3d50d18d760570930db4da5aae849d2f Mon Sep 17 00:00:00 2001
From: monikahedman <monika_hedman@brown.edu>
Date: Fri, 5 Jul 2019 17:33:58 -0400
Subject: small fixes

---
 src/client/views/pdf/PDFViewer.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/client/views/pdf/PDFViewer.tsx')

diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 8af29110f..581237287 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -229,12 +229,13 @@ export class Viewer extends React.Component<IViewerProps> {
         }
     }
 
+    @action
     makeAnnotationDocument = (sourceDoc: Doc | undefined, s: number, color: string): Doc => {
         let annoDocs: Doc[] = [];
         let mainAnnoDoc = Docs.CreateInstance(new Doc(), "", {});
 
         mainAnnoDoc.title = "Annotation on " + StrCast(this.props.parent.Document.title);
-        mainAnnoDoc.pdfDoc = this.props.parent.Document;
+        mainAnnoDoc.pdfDoc = this.props.parent.props.Document;
         let minY = Number.MAX_VALUE;
         this._savedAnnotations.forEach((key: number, value: HTMLDivElement[]) => {
             for (let anno of value) {
-- 
cgit v1.2.3-70-g09d2


From d2d19d6e87111eb011b61ba352d0b39eb8ba2250 Mon Sep 17 00:00:00 2001
From: yipstanley <stanley_yip@brown.edu>
Date: Sun, 14 Jul 2019 19:30:25 -0400
Subject: fixed pdf annotation layer being off position and fixed linking to a
 region on a pdf

---
 src/client/views/collections/CollectionPDFView.tsx | 14 +++++++-------
 src/client/views/pdf/PDFViewer.tsx                 |  1 +
 2 files changed, 8 insertions(+), 7 deletions(-)

(limited to 'src/client/views/pdf/PDFViewer.tsx')

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(), "", {});
-- 
cgit v1.2.3-70-g09d2


From c4f324757c4ce3c9da077f5b10370f3b53cb3411 Mon Sep 17 00:00:00 2001
From: yipstanley <stanley_yip@brown.edu>
Date: Sun, 14 Jul 2019 20:46:15 -0400
Subject: added better ui for pdf menu dragger and search box now clears when
 nothing is searched

---
 src/client/views/pdf/PDFMenu.scss  | 4 ++++
 src/client/views/pdf/PDFViewer.tsx | 4 ----
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/client/views/pdf/PDFViewer.tsx')

diff --git a/src/client/views/pdf/PDFMenu.scss b/src/client/views/pdf/PDFMenu.scss
index a4624b1f6..b06d19c53 100644
--- a/src/client/views/pdf/PDFMenu.scss
+++ b/src/client/views/pdf/PDFMenu.scss
@@ -21,6 +21,10 @@
     .pdfMenu-dragger {
         height: 100%;
         transition: width .2s;
+        background-image: url("https://logodix.com/logo/1020374.png");
+        background-size: 90% 100%;
+        background-repeat: no-repeat;
+        background-position: left center;
     }
 
     .pdfMenu-addTag {
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index e3a716b4b..943454c33 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -450,10 +450,6 @@ export class Viewer extends React.Component<IViewerProps> {
 
     @action
     search = (searchString: string) => {
-        if (searchString.length === 0) {
-            return;
-        }
-
         if (this._pdfViewer._pageViewsReady) {
             this._pdfFindController.executeCommand('find',
                 {
-- 
cgit v1.2.3-70-g09d2

