From 24f9d90c2b465e8a87226ebcf5c9cfdcf7c9701c Mon Sep 17 00:00:00 2001
From: geireann <geireann.lindfield@gmail.com>
Date: Wed, 21 Dec 2022 02:06:32 -0500
Subject: server side updates

---
 .../collectionFreeForm/CollectionFreeFormView.tsx         | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 4818094de..a32db767f 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1021,7 +1021,6 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
     onPointerWheel = (e: React.WheelEvent): void => {
         if (this.layoutDoc._Transform || DocListCast(Doc.MyOverlayDocs?.data).includes(this.props.Document) || this.props.Document.treeViewOutlineMode === TreeViewType.outline) return;
         e.stopPropagation();
-        e.preventDefault();
         switch (Doc.UserDoc().freeformScrollMode) {
             case freeformScrollMode.Pan:
                 // if shift is selected then zoom
@@ -1606,12 +1605,14 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                                 r: cbounds.r - p[0] + c[0],
                                 b: cbounds.b - p[1] + c[1],
                             };
-                            this.layoutDoc._width = pbounds.r - pbounds.x;
-                            this.layoutDoc._height = pbounds.b - pbounds.y;
-                            this.layoutDoc._panX = (cbounds.r + cbounds.x) / 2;
-                            this.layoutDoc._panY = (cbounds.b + cbounds.y) / 2;
-                            this.layoutDoc.x = pbounds.x;
-                            this.layoutDoc.y = pbounds.y;
+                            if (Number.isFinite(pbounds.r - pbounds.x) && Number.isFinite(pbounds.b - pbounds.y)) {
+                                this.layoutDoc._width = pbounds.r - pbounds.x;
+                                this.layoutDoc._height = pbounds.b - pbounds.y;
+                                this.layoutDoc._panX = (cbounds.r + cbounds.x) / 2;
+                                this.layoutDoc._panY = (cbounds.b + cbounds.y) / 2;
+                                this.layoutDoc.x = pbounds.x;
+                                this.layoutDoc.y = pbounds.y;
+                            }
                         }
                     },
                     { fireImmediately: true }
-- 
cgit v1.2.3-70-g09d2

