From 19adcca1a89405a47da57fee64fe5fde4720c16a Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Mon, 5 May 2025 14:05:32 -0400
Subject: got rid of dash _xPadding/_yPadding in favor of just using
 _xMargin/_yMargin.  cleaned up linearView field names

---
 src/client/views/ObservableReactComponent.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'src/client/views/ObservableReactComponent.tsx')

diff --git a/src/client/views/ObservableReactComponent.tsx b/src/client/views/ObservableReactComponent.tsx
index 2290516dc..cf4bf991e 100644
--- a/src/client/views/ObservableReactComponent.tsx
+++ b/src/client/views/ObservableReactComponent.tsx
@@ -16,15 +16,13 @@ export abstract class ObservableReactComponent<T> extends React.Component<T, obj
         makeObservable(this);
     }
     __passiveWheel: HTMLElement | null = null;
-    _isContentActive: () => boolean | undefined = () => false;
+    __isContentActive: () => boolean | undefined = () => false;
 
     /**
      * default method to stop wheel events from bubbling up to parent components.
      * @param e
      */
-    onPassiveWheel = (e: WheelEvent) => {
-        if (this._isContentActive?.()) e.stopPropagation();
-    };
+    onPassiveWheel = (e: WheelEvent) => this.__isContentActive?.() && e.stopPropagation();
 
     /**
      * This fixes the problem where a component uses wheel events to scroll, but is nested inside another component that
@@ -36,7 +34,7 @@ export abstract class ObservableReactComponent<T> extends React.Component<T, obj
      * @param onPassiveWheel an optional function to call to handle the wheel event (and block its propagation. If omitted, the event won't propagate.
      */
     fixWheelEvents = (ele: HTMLElement | null, isContentActive: () => boolean | undefined, onPassiveWheel?: (e: WheelEvent) => void) => {
-        this._isContentActive = isContentActive;
+        this.__isContentActive = isContentActive;
         this.__passiveWheel?.removeEventListener('wheel', onPassiveWheel ?? this.onPassiveWheel);
         this.__passiveWheel = ele;
         ele?.addEventListener('wheel', onPassiveWheel ?? this.onPassiveWheel, { passive: false });
-- 
cgit v1.2.3-70-g09d2

