From 953a298b49c2345741fd7989f9b62cadd76eea52 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 22 Jan 2024 20:41:55 -0500
Subject: fixed pointer events for pdfs

---
 .../collectionFreeForm/CollectionFreeFormView.tsx  | 25 ++++++----------------
 1 file changed, 7 insertions(+), 18 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 d2d931869..3eaf1876c 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1190,15 +1190,14 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
     };
     @computed get childPointerEvents() {
         const engine = this._props.layoutEngine?.() || StrCast(this._props.Document._layoutEngine);
-        const pointerevents = SnappingManager.IsResizing
+        return SnappingManager.IsResizing
             ? 'none'
             : this._props.childPointerEvents?.() ??
-              (this._props.viewDefDivClick || //
-              (engine === computePassLayout.name && !this._props.isSelected()) ||
-              this.isContentActive() === false
-                  ? 'none'
-                  : this._props.pointerEvents?.());
-        return pointerevents;
+                  (this._props.viewDefDivClick || //
+                  (engine === computePassLayout.name && !this._props.isSelected()) ||
+                  this.isContentActive() === false
+                      ? 'none'
+                      : this._props.pointerEvents?.());
     }
 
     @observable _childPointerEvents: 'none' | 'all' | 'visiblepainted' | undefined = undefined;
@@ -1476,17 +1475,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
                 );
 
                 this._disposers.pointerevents = reaction(
-                    () => {
-                        const engine = this._props.layoutEngine?.() || StrCast(this._props.Document._layoutEngine);
-                        return SnappingManager.IsResizing
-                            ? 'none'
-                            : this._props.childPointerEvents?.() ??
-                                  (this._props.viewDefDivClick || //
-                                  (engine === computePassLayout.name && !this._props.isSelected()) ||
-                                  this.isContentActive() === false
-                                      ? 'none'
-                                      : this._props.pointerEvents?.());
-                    },
+                    () => this.childPointerEvents,
                     pointerevents => (this._childPointerEvents = pointerevents as any),
                     { fireImmediately: true }
                 );
-- 
cgit v1.2.3-70-g09d2

