diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-01 22:58:45 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-11-01 22:58:45 +0800 |
commit | fa65753233e17d90a3306432bba9d212307e5b68 (patch) | |
tree | 005123322c4a65b558e7ece45edcffe20b8dca1d /src/client/util/Import & Export/ImageUtils.ts | |
parent | 3def219d20179486fe3427c957f680e5d1d705df (diff) | |
parent | 7b96bc4770bd275db0ddd664bb6e8ff33bbbcb78 (diff) |
Merge branch 'master' into presentation_v1
Diffstat (limited to 'src/client/util/Import & Export/ImageUtils.ts')
-rw-r--r-- | src/client/util/Import & Export/ImageUtils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/Import & Export/ImageUtils.ts b/src/client/util/Import & Export/ImageUtils.ts index 0d12b39b8..9bd92a316 100644 --- a/src/client/util/Import & Export/ImageUtils.ts +++ b/src/client/util/Import & Export/ImageUtils.ts @@ -1,7 +1,6 @@ import { Doc } from "../../../fields/Doc"; import { ImageField } from "../../../fields/URLField"; -import { Cast, StrCast } from "../../../fields/Types"; -import { Docs } from "../../documents/Documents"; +import { Cast, StrCast, NumCast } from "../../../fields/Types"; import { Networking } from "../../Network"; import { Id } from "../../../fields/FieldSymbols"; import { Utils } from "../../../Utils"; @@ -22,6 +21,7 @@ export namespace ImageUtils { } = await Networking.PostToServer("/inspectImage", { source }); document.exif = error || Doc.Get.FromJson({ data }); const proto = Doc.GetProto(document); + nativeWidth && (document._height = NumCast(document._width) * nativeHeight / nativeWidth); proto["data-nativeWidth"] = nativeWidth; proto["data-nativeHeight"] = nativeHeight; proto["data-path"] = source; |