aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-15 13:05:21 -0400
committerbobzel <zzzman@gmail.com>2021-09-15 13:05:21 -0400
commit2a287df36a6a2acbc5dad4360db6a6840573d364 (patch)
tree21b12eabaacc2a4abef4fbe990d968bdca6f6269 /src
parent46283667f9c183fffe171d728fa043704d8fab01 (diff)
fixed infinite loop in grid space selection that conflated with setting group bounds automatically when rendered
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);
}