aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-24 12:12:56 -0400
committerbobzel <zzzman@gmail.com>2023-04-24 12:12:56 -0400
commit9629ab77ed15f71a80f2a8becabf944ce584fe18 (patch)
tree9b819b850db7a50e20f2cde8efd3985831a3bac9
parent24d4782be0d1160e073e0040d6926206cf465859 (diff)
from last
-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 56bb2601f..3333befc6 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -142,7 +142,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
return {
bounds: { ...this.contentBounds, cx: (this.contentBounds.x + this.contentBounds.r) / 2, cy: (this.contentBounds.y + this.contentBounds.b) / 2 },
scale:
- !this.childDocs.length || this.contentBounds.b === this.contentBounds.y || this.contentBounds.r - this.contentBounds.x
+ !this.childDocs.length || !Number.isFinite(this.contentBounds.b - this.contentBounds.y) || !Number.isFinite(this.contentBounds.r - this.contentBounds.x)
? 1
: Math.min(this.props.PanelHeight() / (this.contentBounds.b - this.contentBounds.y), this.props.PanelWidth() / (this.contentBounds.r - this.contentBounds.x)),
};