aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-24 11:35:04 -0500
committerbobzel <zzzman@gmail.com>2025-02-24 11:35:04 -0500
commit383a8a2f017c12c578537d3cb3005e00be019bd7 (patch)
treebba89330013155a8cf75edcce0ecc68e251fc173 /src
parentc1159c2587d69e42496c493b508ecb3e8ba0f65c (diff)
fixed adding images and giving them a height (just broken by setting layout_nativeDimEditable)
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/ImageBox.tsx2
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;
}
},