diff options
author | bob <bcz@cs.brown.edu> | 2019-06-28 14:28:47 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-28 14:28:47 -0400 |
commit | 09042b933c843d24a715e8c58414976133b19e41 (patch) | |
tree | 9fc983041c0a37763cf18c52f265f8a0bee238e7 /src/client/views/nodes/ImageBox.tsx | |
parent | dc4b658639beb21e73fc2411abd147ff6716ba3d (diff) |
fixed template application to create expanded documents
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 378b13b0d..06bf65f73 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -205,7 +205,7 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD requestImageSize(window.origin + RouteStore.corsProxy + "/" + srcpath) .then((size: any) => { let aspect = size.height / size.width; - if (layoutdoc[HeightSym]() / layoutdoc[WidthSym]() != aspect) { + if (Math.abs(layoutdoc[HeightSym]() / layoutdoc[WidthSym]() - aspect) > 0.01) { setTimeout(action(() => { layoutdoc.height = layoutdoc[WidthSym]() * aspect; layoutdoc.nativeHeight = size.height; |