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

---
 src/client/views/collections/CollectionPileView.tsx | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

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

diff --git a/src/client/views/collections/CollectionPileView.tsx b/src/client/views/collections/CollectionPileView.tsx
index 359fdf543..b1d379631 100644
--- a/src/client/views/collections/CollectionPileView.tsx
+++ b/src/client/views/collections/CollectionPileView.tsx
@@ -41,14 +41,14 @@ export class CollectionPileView extends CollectionSubView() {
     @undoBatch
     addPileDoc = (doc: Doc | Doc[]) => {
         (doc instanceof Doc ? [doc] : doc).map(d => DocUtils.iconify(d));
-        return this.props.addDocument?.(doc) || false;
+        return this._props.addDocument?.(doc) || false;
     };
 
     @undoBatch
     removePileDoc = (doc: Doc | Doc[], targetCollection: Doc | undefined, addDoc: (doc: Doc | Doc[]) => boolean) => {
         (doc instanceof Doc ? [doc] : doc).forEach(d => Doc.deiconifyView(d));
-        const ret = this.props.moveDocument?.(doc, targetCollection, addDoc) || false;
-        if (ret && !DocListCast(this.dataDoc[this.fieldKey ?? 'data']).length) this.props.DocumentView?.()._props.removeDocument?.(this.Document);
+        const ret = this._props.moveDocument?.(doc, targetCollection, addDoc) || false;
+        if (ret && !DocListCast(this.dataDoc[this.fieldKey ?? 'data']).length) this._props.DocumentView?.()._props.removeDocument?.(this.Document);
         return ret;
     };
 
@@ -57,7 +57,7 @@ export class CollectionPileView extends CollectionSubView() {
     }
     @computed get contentEvents() {
         const isStarburst = this.layoutEngine() === computeStarburstLayout.name;
-        return this.props.isContentActive() && isStarburst ? undefined : 'none';
+        return this._props.isContentActive() && isStarburst ? undefined : 'none';
     }
 
     // returns the contents of the pileup in a CollectionFreeFormView
@@ -65,13 +65,13 @@ export class CollectionPileView extends CollectionSubView() {
         return (
             <div className="collectionPileView-innards" style={{ pointerEvents: this.contentEvents }}>
                 <CollectionFreeFormView
-                    {...this.props} //
+                    {...this._props} //
                     layoutEngine={this.layoutEngine}
                     addDocument={this.addPileDoc}
                     moveDocument={this.removePileDoc}
                     // pile children never have their contents active, but will be document active whenever the entire pile is.
                     childContentsActive={returnFalse}
-                    childDocumentsActive={this.props.isDocumentActive}
+                    childDocumentsActive={this._props.isDocumentActive}
                     childDragAction="move"
                     childClickScript={this.toggleIcon}
                 />
@@ -125,7 +125,7 @@ export class CollectionPileView extends CollectionSubView() {
                         const doc = this.childDocs[0];
                         doc.x = e.clientX;
                         doc.y = e.clientY;
-                        this.props.addDocTab(doc, OpenWhere.inParentFromScreen) && (this.props.removeDocument?.(doc) || false);
+                        this._props.addDocTab(doc, OpenWhere.inParentFromScreen) && (this._props.removeDocument?.(doc) || false);
                         dist = 0;
                     }
                 }
@@ -143,7 +143,6 @@ export class CollectionPileView extends CollectionSubView() {
 
     // onClick for toggling the pileup view
     @undoBatch
-    @action
     onClick = (e: React.MouseEvent) => {
         if (e.button === 0) {
             SelectionManager.DeselectAll();
@@ -154,7 +153,7 @@ export class CollectionPileView extends CollectionSubView() {
 
     render() {
         return (
-            <div className={`collectionPileView`} onClick={this.onClick} onPointerDown={this.pointerDown} style={{ width: this.props.PanelWidth(), height: '100%' }}>
+            <div className={`collectionPileView`} onClick={this.onClick} onPointerDown={this.pointerDown} style={{ width: this._props.PanelWidth(), height: '100%' }}>
                 {this.contents}
             </div>
         );
-- 
cgit v1.2.3-70-g09d2

