aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/pdf/PDFViewer.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-05 22:25:44 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-08-05 22:25:44 -0500
commit2df0503edefde20ba1b3c46c16788effb0a7560c (patch)
treebac31bc2356e7de4aa1df43b382eb8c957ce969f /src/client/views/pdf/PDFViewer.tsx
parentea855ecda2c3df9e5d0881d43e2fdbceb9dccafc (diff)
parent6d8dfee38bd39b95396cbc97405516693116b58f (diff)
merge
Diffstat (limited to 'src/client/views/pdf/PDFViewer.tsx')
-rw-r--r--src/client/views/pdf/PDFViewer.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx
index 264d3e6c6..cfa9a1844 100644
--- a/src/client/views/pdf/PDFViewer.tsx
+++ b/src/client/views/pdf/PDFViewer.tsx
@@ -9,8 +9,8 @@ import { documentSchema } from "../../../fields/documentSchemas";
import { Id } from "../../../fields/FieldSymbols";
import { InkTool } from "../../../fields/InkField";
import { List } from "../../../fields/List";
-import { createSchema, makeInterface } from "../../../fields/Schema";
-import { ScriptField } from "../../../fields/ScriptField";
+import { createSchema, makeInterface, listSpec } from "../../../fields/Schema";
+import { ScriptField, ComputedField } from "../../../fields/ScriptField";
import { Cast, NumCast } from "../../../fields/Types";
import { PdfField } from "../../../fields/URLField";
import { TraceMobx, GetEffectiveAcl } from "../../../fields/util";
@@ -347,6 +347,11 @@ export class PDFViewer extends ViewBoxAnnotatableComponent<IViewerProps, PdfDocu
}
@action
+ scrollToFrame = (duration: number, top: number) => {
+ this._mainCont.current && smoothScroll(duration, this._mainCont.current, top);
+ }
+
+ @action
scrollToAnnotation = (scrollToAnnotation: Doc) => {
if (scrollToAnnotation) {
const offset = this.visibleHeight() / 2;