aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorZachary Zhang <zacharyzhang7@gmail.com>2024-07-10 13:28:21 -0400
committerZachary Zhang <zacharyzhang7@gmail.com>2024-07-10 13:28:21 -0400
commit376eb907e68be8408f12fe79dd23a6e5f46ffe60 (patch)
tree1e56480951e0b940dd47b98412eb2bc3c6351946 /src/client/views/nodes/ImageBox.tsx
parent8922b3de6fcd53d5a09e719b2885e94ddb069c76 (diff)
parentf23ea0cbde3c4193b8039f317fe71d965c8cbf40 (diff)
Merge branch 'master' into zach-starter
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();