diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-07-25 11:15:54 -0400 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-07-25 11:15:54 -0400 |
commit | d7206c2fd9ae55d6754dc44726dd6f16c3a67c22 (patch) | |
tree | fdca6618026998f659c85e33e36d18f39bfba812 /src/client/views/nodes/ImageBox.tsx | |
parent | 4d4283f74669698ec3cfaf8ee2c953acad524197 (diff) | |
parent | 25ff5e562e80a93edc0d475b104862361a049016 (diff) |
Merge branch 'alyssa-starter' of https://github.com/brown-dash/Dash-Web into alyssa-starter
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index 6619b765b..86da64e5e 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -796,6 +796,11 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { }; focus = (anchor: Doc, options: FocusViewOptions) => (anchor.type === DocumentType.CONFIG ? undefined : this._ffref.current?.focus(anchor, options)); + renderedPixelDimensions = async () => { + const { nativeWidth: width, nativeHeight: height } = await Networking.PostToServer('/inspectImage', { source: this.paths[0] }); + return { width, height }; + }; + savedAnnotations = () => this._savedAnnotations; render() { TraceMobx(); |