diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-02-01 16:25:10 -0500 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-02-01 16:25:10 -0500 |
| commit | 693665069c170983bd76336b804ec73870642fe3 (patch) | |
| tree | 144c89641aa194f485ab032b47c3e90c020f9fdb /src/client/views/nodes/ImageBox.tsx | |
| parent | c96fbf77aa35b3c7f8566921064886df01f195d9 (diff) | |
simplified Presentations a bit by using templates
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
| -rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 382ca526d..66b0e5a15 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -259,8 +259,10 @@ export class ImageBox extends DocAnnotatableComponent<FieldViewProps, ImageDocum .catch((err: any) => console.log(err)); } else if (this.Document._nativeHeight !== cachedNativeSize.width || this.Document._nativeWidth !== cachedNativeSize.height) { !(this.Document[StrCast(this.props.Document.layoutKey)] instanceof Doc) && setTimeout(() => { - this.Document._nativeWidth = cachedNativeSize.width; - this.Document._nativeHeight = cachedNativeSize.height; + if (!(this.Document[StrCast(this.props.Document.layoutKey)] instanceof Doc)) { + this.Document._nativeWidth = cachedNativeSize.width; + this.Document._nativeHeight = cachedNativeSize.height; + } }, 0); } } |
