diff options
author | bobzel <zzzman@gmail.com> | 2021-09-15 13:05:21 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-15 13:05:21 -0400 |
commit | 2a287df36a6a2acbc5dad4360db6a6840573d364 (patch) | |
tree | 21b12eabaacc2a4abef4fbe990d968bdca6f6269 | |
parent | 46283667f9c183fffe171d728fa043704d8fab01 (diff) |
fixed infinite loop in grid space selection that conflated with setting group bounds automatically when rendered
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 3 |
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); } |