aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-05 11:59:13 -0500
committerbobzel <zzzman@gmail.com>2021-02-05 11:59:13 -0500
commitb846e1c28f92bb21063c15fe43c07d98335b4315 (patch)
treef5184a704d3e81e0b237615603db0dcf9cca09a2 /src
parent8e2d0aee8a577762a49078a4c0233919b5616585 (diff)
use high res images on select
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/ImageBox.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 59bc2e733..286b3bf5f 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -222,7 +222,8 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps, ImageD
if (!/\.(png|jpg|jpeg|gif|webp)$/.test(lower)) return url.href; //Why is this here
const ext = path.extname(url.href);
- this._curSuffix = this.props.renderDepth < 1 ? "_o" : this.props.PanelWidth() < 100 ? "_s" : "_m";
+ const scrSize = this.props.ScreenToLocalTransform().inverse().transformDirection(this.nativeSize.nativeWidth, this.nativeSize.nativeHeight);
+ this._curSuffix = this.props.renderDepth < 1 ? "_o" : scrSize[0] < 100 ? "_s" : scrSize[0] < 400 || !this.props.isSelected() ? "_m" : "_o";
return url.href.replace(ext, this._curSuffix + ext);
}