aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authoreleanor-park <113556828+eleanor-park@users.noreply.github.com>2024-07-11 11:48:44 -0400
committerGitHub <noreply@github.com>2024-07-11 11:48:44 -0400
commit2bf43f9906f84a600e6d5ea9dfc6c1af0ee3fd42 (patch)
tree19895e85364e58246ec2869459e9d29f6621526e /src/client/views/nodes/ImageBox.tsx
parentf33e6c9e191092e6050f980892b4404ff0d0a1f2 (diff)
parent4438e7fe202ff4091b26f073122e7866ec9abb46 (diff)
Merge pull request #316 from brown-dash/master
updating gpt draw branch
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx5
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();