From 905750f6625ed1f11242cd0e0ea52e4e5a606c96 Mon Sep 17 00:00:00 2001 From: Eleanor Eng Date: Tue, 4 Jun 2019 10:41:07 -0400 Subject: merge --- .../collections/collectionFreeForm/CollectionFreeFormView.tsx | 7 ++----- src/client/views/nodes/PDFBox.tsx | 8 +++++--- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index e741953d6..49195fba9 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -327,7 +327,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { private childViews = () => [ , ...this.views - ]; + ] render() { const containerName = `collectionfreeformview${this.isAnnotationOverlay ? "-overlay" : "-container"}`; const easing = () => this.props.Document.panTransformType === "Ease"; @@ -349,11 +349,8 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { -<<<<<<< HEAD - -======= + ->>>>>>> 6f49d067b58caf6297f7ae7687cf05b627c27a1d ); } diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index aa29a7170..6b5f5ab65 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -261,7 +261,7 @@ export class PDFBox extends DocComponent(PdfDocumen this.props.Document.thumbnail = new ImageField(new URL(url)); } runInAction(() => this._renderAsSvg = true); - }) + }); })) .catch(function (error: any) { console.error('oops, something went wrong!', error); @@ -335,8 +335,9 @@ export class PDFBox extends DocComponent(PdfDocumen } choosePath(url: URL) { - if (url.protocol === "data" || url.href.indexOf(window.location.origin) === -1) + if (url.protocol === "data" || url.href.indexOf(window.location.origin) === -1) { return url.href; + } let ext = path.extname(url.href); return url.href.replace(ext, this._curSuffix + ext); } @@ -350,8 +351,9 @@ export class PDFBox extends DocComponent(PdfDocumen } @action onError = () => { let timeout = this._curSuffix === "_s" ? this._smallRetryCount : this._curSuffix === "_m" ? this._mediumRetryCount : this._largeRetryCount; - if (timeout < 10) + if (timeout < 10) { setTimeout(this.retryPath, Math.min(10000, timeout * 5)); + } } _curSuffix = "_m"; -- cgit v1.2.3-70-g09d2