aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-09 16:58:33 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-09 16:58:33 -0400
commit6ae5bd63d5355a03dba099a149532e7c6b1fd74a (patch)
tree5971f41919806c4055aab9f6e8d3284a7098cd14 /src/client/views/nodes/ImageBox.tsx
parentb21d8cc9d1b25ccd2e0103f47ad132dd6f04612d (diff)
small changes for pull request; removed schema type reference in editableview; a couple lint changes
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 226fad977..c156c80e4 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -124,15 +124,15 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
{ fireImmediately: true, delay: 1000 }
);
const { layoutDoc } = this;
- // this._disposers.path = reaction(
- // () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }),
- // ({ nativeSize, width }) => {
- // if (layoutDoc === this.layoutDoc || !this.layoutDoc._height) {
- // this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth;
- // }
- // },
- // { fireImmediately: true }
- // );
+ this._disposers.path = reaction(
+ () => ({ nativeSize: this.nativeSize, width: NumCast(this.layoutDoc._width) }),
+ ({ nativeSize, width }) => {
+ if (layoutDoc === this.layoutDoc || !this.layoutDoc._height) {
+ this.layoutDoc._height = (width * nativeSize.nativeHeight) / nativeSize.nativeWidth;
+ }
+ },
+ { fireImmediately: true }
+ );
this._disposers.scroll = reaction(
() => this.layoutDoc.layout_scrollTop,
sTop => {