From e2196ef689b6784613b5950446609b08fb0ef7a2 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 3 May 2024 09:20:46 -0400 Subject: reverting unnecessary changes --- .../views/collections/CollectionNoteTakingView.tsx | 1 - src/client/views/nodes/DocumentView.tsx | 19 +++++++++---------- .../views/nodes/formattedText/DashFieldView.tsx | 8 ++++---- 3 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index 8c10db5dc..6318620e0 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -138,7 +138,6 @@ export class CollectionNoteTakingView extends CollectionSubView() { sections.get(existingHeader)!.push(d); } }); - //*!* // now we add back in the docs that we're dragging if (rowCol.length && columnHeaders.length > rowCol[1]) { const offset = 0; diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 5f2a71ef5..ae83819e5 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -279,7 +279,6 @@ export class DocumentViewInternal extends DocComponent dv.ContentDiv); @@ -381,7 +380,7 @@ export class DocumentViewInternal extends DocComponent { if (this._props.isGroupActive?.() === 'child' && !this._props.isDocumentActive?.()) return; - this._longPressSelector = setTimeout(() => (DocumentView.LongPress && this._props.select(false), 1000)); //!!! + this._longPressSelector = setTimeout(() => (DocumentView.LongPress && this._props.select(false), 1000)); if (!GestureOverlay.DownDocView) GestureOverlay.DownDocView = this._docView; this._downX = e.clientX; @@ -1348,14 +1347,14 @@ export class DocumentView extends DocComponent() { select = (extendSelection: boolean, focusSelection?: boolean) => { /*if (this.IsSelected && SelectionManager.Views.length > 1) SelectionManager.DeselectView(this); else {*/ - SelectionManager.SelectView(this, extendSelection); - if (focusSelection) { - DocumentManager.Instance.showDocument(this.Document, { - willZoomCentered: true, - zoomScale: 0.9, - zoomTime: 500, - }); - } + SelectionManager.SelectView(this, extendSelection); + if (focusSelection) { + DocumentManager.Instance.showDocument(this.Document, { + willZoomCentered: true, + zoomScale: 0.9, + zoomTime: 500, + }); + } //} }; DataTransition = () => this._props.DataTransition?.() || StrCast(this.Document.dataTransition); diff --git a/src/client/views/nodes/formattedText/DashFieldView.tsx b/src/client/views/nodes/formattedText/DashFieldView.tsx index a9d916fcd..6186b3d99 100644 --- a/src/client/views/nodes/formattedText/DashFieldView.tsx +++ b/src/client/views/nodes/formattedText/DashFieldView.tsx @@ -135,12 +135,12 @@ export class DashFieldViewInternal extends ObservableReactComponent this._expanded && this._props.editable; finishEdit = action(() => (this._expanded = false)); selectedCell = (): [Doc, number] => [this._dashDoc!, 0]; + selectedCells = () => [this._dashDoc!]; // set the display of the field's value (checkbox for booleans, span of text for strings) @computed get fieldValueContent() { return !this._dashDoc ? null : ( -
{console.log(true); - (this._expanded = !this._props.editable ? !this._expanded : true)})} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> +
(this._expanded = !this._props.editable ? !this._expanded : true))} style={{ fontSize: 'smaller', width: this._props.hideKey ? this._props.tbox._props.PanelWidth() - 20 : undefined }}> [this._dashDoc!]} - selectedCol={() => 0} + selectedCells={this.selectedCells} + selectedCol={returnZero} fieldKey={this._fieldKey} rowHeight={returnZero} isRowActive={this.isRowActive} -- cgit v1.2.3-70-g09d2