aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-10-13 16:57:25 -0400
committerbobzel <zzzman@gmail.com>2020-10-13 16:57:25 -0400
commit072d1aa988f36220e4b74c0ee5413f0597a4b619 (patch)
treed38e0d0eb37a6a123a8c93ee404190e3629d5dbc
parentd87cd4f20a8b5b4f33d799a4ef42fb14337638a5 (diff)
prevent zooming out on annotation overlays beyond 1-1
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 71519f2b9..f075aefe1 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -789,7 +789,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
}
const localTransform = this.getLocalTransform().inverse().scaleAbout(deltaScale, x, y);
- if (localTransform.Scale >= 0.15 || localTransform.Scale > this.zoomScaling()) {
+ if ((localTransform.Scale > 1 || !this.props.annotationsKey) && (localTransform.Scale >= 0.15 || localTransform.Scale > this.zoomScaling())) {
const safeScale = Math.min(Math.max(0.15, localTransform.Scale), 20);
this.props.Document[this.scaleFieldKey] = Math.abs(safeScale);
this.setPan(-localTransform.TranslateX / safeScale, -localTransform.TranslateY / safeScale);