diff options
author | bobzel <zzzman@gmail.com> | 2025-02-24 11:35:04 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-02-24 11:35:04 -0500 |
commit | 383a8a2f017c12c578537d3cb3005e00be019bd7 (patch) | |
tree | bba89330013155a8cf75edcce0ecc68e251fc173 /src/client/views/nodes/ImageBox.tsx | |
parent | c1159c2587d69e42496c493b508ecb3e8ba0f65c (diff) |
fixed adding images and giving them a height (just broken by setting layout_nativeDimEditable)
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 1cc298b11..f76e10a0e 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -148,7 +148,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { this._disposers.path = reaction( () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }), ({ nativeSize, width }) => { - if ((layoutDoc === this.layoutDoc || !this.layoutDoc._height) && !this.layoutDoc._layout_nativeDimEditable) { + if ((layoutDoc === this.layoutDoc && !this.layoutDoc._layout_nativeDimEditable) || !this.layoutDoc._height) { this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth; } }, |