diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-04 22:29:17 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-04 22:29:17 -0500 |
| commit | de3ca90be367a8c763b07e315caaad6de79f3f96 (patch) | |
| tree | 1e01294f6a304180e46dca6b3533bfb934a4d37b /src/client/views/collections/CollectionPileView.tsx | |
| parent | 3c5813a032a5b59047f1e11b63e7f74c36b5b29e (diff) | |
fixed notetaking & pile views with _props
Diffstat (limited to 'src/client/views/collections/CollectionPileView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionPileView.tsx | 17 |
1 files changed, 8 insertions, 9 deletions
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> ); |
