aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 8128cb0d9..cb912484f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1238,7 +1238,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
this.layoutDoc.x = pbounds.x;
this.layoutDoc.y = pbounds.y;
}
- });
+ }, { fireImmediately: true });
}
componentWillUnmount() {
@@ -1405,6 +1405,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
}
chooseGridSpace = (gridSpace: number): number => {
+ if (!this.zoomScaling()) return 50;
const divisions = this.props.PanelWidth() / this.zoomScaling() / gridSpace + 3;
return divisions < 60 ? gridSpace : this.chooseGridSpace(gridSpace * 10);
}