aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index cb0b0d71f..4616ec057 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -43,14 +43,14 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
public static openSidebarWidth = 250;
public static sidebarResizerWidth = 5;
private _searchString: string = '';
- private _initialScrollTarget: Opt<Doc>;
+ private _initialScrollTarget: Opt;
private _pdfViewer: PDFViewer | undefined;
private _searchRef = React.createRef<HTMLInputElement>();
private _disposers: { [name: string]: IReactionDisposer } = {};
private _sidebarRef = React.createRef<SidebarAnnos>();
@observable private _searching: boolean = false;
- @observable private _pdf: Opt<Pdfjs.PDFDocumentProxy> = undefined;
+ @observable private _pdf: Opt = undefined;
@observable private _pageControls = false;
@computed get pdfUrl() {
@@ -242,13 +242,13 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
options.didMove = true;
this.toggleSidebar(false);
}
- return new Promise<Opt<DocumentView>>(res => {
+ return new Promise<Opt>(res => {
DocumentView.addViewRenderedCb(doc, dv => res(dv));
});
};
getAnchor = (addAsAnnotation: boolean, pinProps?: PinProps) => {
- let ele: Opt<HTMLDivElement>;
+ let ele: Opt;
if (this._pdfViewer?.selectionContent()) {
ele = document.createElement('div');
ele.append(this._pdfViewer.selectionContent()!);
@@ -327,7 +327,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
this._initialScrollTarget = undefined;
}
};
- searchStringChanged = (e: React.ChangeEvent<HTMLInputElement>) => {
+ searchStringChanged = (e: React.ChangeEvent) => {
this._searchString = e.currentTarget.value;
};
@@ -365,8 +365,8 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
}
);
};
- @observable _previewNativeWidth: Opt<number> = undefined;
- @observable _previewWidth: Opt<number> = undefined;
+ @observable _previewNativeWidth: Opt = undefined;
+ @observable _previewWidth: Opt = undefined;
toggleSidebar = action((preview: boolean = false) => {
const nativeWidth = NumCast(this.layoutDoc[this.fieldKey + '_nativeWidth']);
const sideratio = ((!this.layoutDoc.nativeWidth || this.layoutDoc.nativeWidth === nativeWidth ? PDFBox.openSidebarWidth : 0) + nativeWidth) / nativeWidth;
@@ -637,7 +637,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
}
static pdfcache = new Map<string, Pdfjs.PDFDocumentProxy>();
- static pdfpromise = new Map<string, Promise<Pdfjs.PDFDocumentProxy>>();
+ static pdfpromise = new Map<string, Promise>();
render() {
TraceMobx();
const pdfView = !this._pdf ? null : this.renderPdfView;