From 846e1c7eba28f042509ec84c31afe2bcbb5a2283 Mon Sep 17 00:00:00 2001 From: bob Date: Thu, 23 Jan 2020 18:43:53 -0500 Subject: imagebox fixes --- src/client/views/nodes/ImageBox.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/ImageBox.tsx') diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 1a07c1598..7b06d323f 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -214,7 +214,7 @@ export class ImageBox extends DocAnnotatableComponent { - if (!this.dataDoc[this.props.fieldKey + "-nativeHeight"]) + if (!this.dataDoc[this.props.fieldKey + "-nativeHeight"]) { requestImageSize(imgPath) .then((size: any) => { const rotation = NumCast(this.dataDoc[this.props.fieldKey + "-rotation"]) % 180; @@ -225,13 +225,19 @@ export class ImageBox extends DocAnnotatableComponent console.log(err)); + } else { + setTimeout(() => { + this.Document._nativeHeight = NumCast(this.dataDoc[this.props.fieldKey + "-nativeHeight"]); + this.Document._nativeWidth = NumCast(this.dataDoc[this.props.fieldKey + "-nativeWidth"]); + }, 0); + } } @action -- cgit v1.2.3-70-g09d2