diff options
author | eleanor-park <eleanor_park@brown.edu> | 2024-07-11 11:50:03 -0400 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2024-07-11 11:50:03 -0400 |
commit | db1462bb2ea327a98ca239080e88944425aba768 (patch) | |
tree | 43f10da3bae02b3c1cc5a67ae4c206aaa62dbbc9 /src/client/views/nodes/ImageBox.tsx | |
parent | 49b3c7cbe01f830a2b1d2c02452901fe360348d3 (diff) | |
parent | 2bf43f9906f84a600e6d5ea9dfc6c1af0ee3fd42 (diff) |
Merge branch 'eleanor-gptdraw' of https://github.com/brown-dash/Dash-Web into eleanor-gptdraw
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 e4b3a1b9b..68c313480 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -448,6 +448,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(); |