diff options
author | bobzel <zzzman@gmail.com> | 2023-11-27 13:46:27 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-11-27 13:46:27 -0500 |
commit | ac360607bee82f0fef769eada99dc0b3f85ae70a (patch) | |
tree | 25d145b1d9af0e3fd0d3741bbf68282ff56381b5 /src/fields/Doc.ts | |
parent | a1bd5f7bce9aa1e9cb0d1194789fc482472465bc (diff) |
fixed dataView to not lose focus when typing 'enter' by fixing freeformdocumentview panelwidth() to
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 368aaa5db..e2746091e 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1059,7 +1059,7 @@ export namespace Doc { } export function NativeHeight(doc?: Doc, dataDoc?: Doc, useHeight?: boolean) { if (!doc) return 0; - const nheight = (Doc.NativeWidth(doc, dataDoc, useHeight) * NumCast(doc._height)) / NumCast(doc._width); + const nheight = (Doc.NativeWidth(doc, dataDoc, useHeight) / NumCast(doc._width)) * NumCast(doc._height); // divide before multiply to avoid floating point errrorin case nativewidth = width const dheight = NumCast((dataDoc || doc)[Doc.LayoutFieldKey(doc) + '_nativeHeight'], useHeight ? NumCast(doc._height) : 0); return NumCast(doc._nativeHeight, nheight || dheight); } |