From 383a8a2f017c12c578537d3cb3005e00be019bd7 Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 24 Feb 2025 11:35:04 -0500 Subject: fixed adding images and giving them a height (just broken by setting layout_nativeDimEditable) --- src/client/views/nodes/ImageBox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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() { 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; } }, -- cgit v1.2.3-70-g09d2