From de3ca90be367a8c763b07e315caaad6de79f3f96 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 4 Jan 2024 22:29:17 -0500
Subject: fixed notetaking & pile views with _props

---
 .../views/collections/CollectionNoteTakingViewDivider.tsx   | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

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

diff --git a/src/client/views/collections/CollectionNoteTakingViewDivider.tsx b/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
index 2aad48d4a..5e4bce19d 100644
--- a/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
@@ -3,6 +3,7 @@ import { observer } from 'mobx-react';
 import * as React from 'react';
 import { emptyFunction, setupMoveUpEvents } from '../../../Utils';
 import { UndoManager } from '../../util/UndoManager';
+import { ObservableReactComponent } from '../ObservableReactComponent';
 
 interface DividerProps {
     index: number;
@@ -17,8 +18,7 @@ interface DividerProps {
  * are two simple vertical lines that allow the user to alter the widths of CollectionNoteTakingViewColumns.
  */
 @observer
-export class CollectionNoteTakingViewDivider extends React.Component<DividerProps> {
-    @observable private isHoverActive = false;
+export class CollectionNoteTakingViewDivider extends ObservableReactComponent<DividerProps> {
     @observable private isResizingActive = false;
 
     @action
@@ -29,12 +29,11 @@ export class CollectionNoteTakingViewDivider extends React.Component<DividerProp
             e,
             (e, down, delta) => {
                 if (!batch) batch = UndoManager.StartBatch('resizing');
-                this.props.setColumnStartXCoords(delta[0], this.props.index);
+                this._props.setColumnStartXCoords(delta[0], this._props.index);
                 return false;
             },
             action(() => {
                 this.isResizingActive = false;
-                this.isHoverActive = false;
                 batch?.end();
             }),
             emptyFunction
@@ -50,10 +49,8 @@ export class CollectionNoteTakingViewDivider extends React.Component<DividerProp
                     display: 'flex',
                     alignItems: 'center',
                     cursor: 'col-resize',
-                    pointerEvents: this.props.isContentActive() ? 'all' : 'none',
-                }}
-                onPointerEnter={action(() => (this.isHoverActive = true))}
-                onPointerLeave={action(() => !this.isResizingActive && (this.isHoverActive = false))}>
+                    pointerEvents: this._props.isContentActive() ? 'all' : 'none',
+                }}>
                 <div
                     className="columnResizer-handler"
                     onPointerDown={e => this.registerResizing(e)}
-- 
cgit v1.2.3-70-g09d2

