From a0f46b6216e8150e03b1790a42eb17cc1958a45c Mon Sep 17 00:00:00 2001 From: ljungster Date: Thu, 21 Apr 2022 17:30:21 -0400 Subject: EOD Apr. 21 --- .../views/collections/CollectionNoteTakingView.tsx | 27 ++++++++++++---------- .../CollectionNoteTakingViewFieldColumn.tsx | 16 +++++-------- 2 files changed, 21 insertions(+), 22 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index ff9e22ce1..5f9a4f4d0 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -66,7 +66,7 @@ export class CollectionNoteTakingView extends CollectionSubView { const height = () => this.getDocHeight(d); const width = () => this.getDocWidth(d); + //TODO change style here so that const style = { width: width(), marginTop: i ? this.gridGap : 0, height: height() }; return
{this.getDisplayDoc(d, width)} @@ -291,7 +292,7 @@ export class CollectionNoteTakingView extends CollectionSubView { - runInAction(() => this._cursor = "grabbing"); - setupMoveUpEvents(this, e, this.onDividerMove, action(() => this._cursor = "grab"), emptyFunction); - } - @action - onDividerMove = (e: PointerEvent, down: number[], delta: number[]) => { - this.layoutDoc._columnWidth = Math.max(10, this.columnWidth + delta[0]); - return false; - } + // columnDividerDown = (e: React.PointerEvent) => { + // runInAction(() => this._cursor = "grabbing"); + // setupMoveUpEvents(this, e, this.onDividerMove, action(() => this._cursor = "grab"), emptyFunction); + // } + + // @action + // onDividerMove = (e: PointerEvent, down: number[], delta: number[]) => { + // this.layoutDoc._columnWidth = Math.max(10, this.columnWidth + delta[0]); + // return false; + // } //TODO: currently unused. How can we make use of it? // @computed get columnDragger() { @@ -498,6 +500,7 @@ export class CollectionNoteTakingView extends CollectionSubView Array.from(this.Sections); refList: any[] = []; @@ -629,7 +633,6 @@ export class CollectionNoteTakingView extends CollectionSubView this.sectionNoteTaking(section[0], section[1])); } @computed get buttonMenu() { diff --git a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx index b4e0aac60..452af2ddf 100644 --- a/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx +++ b/src/client/views/collections/CollectionNoteTakingViewFieldColumn.tsx @@ -119,9 +119,10 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component NumCast(doc.heading) > maxHeading ? NumCast(doc.heading) : maxHeading, 0); - const heading = maxHeading === 0 || this.props.docList.length === 0 ? 1 : maxHeading === 1 ? 2 : 3; - newDoc.heading = heading; + // TODO not sure why we have all of this "maxHeading stuff" + // const maxHeading = this.props.docList.reduce((maxHeading, doc) => NumCast(doc.heading) > maxHeading ? NumCast(doc.heading) : maxHeading, 0); + // const heading = maxHeading === 0 || this.props.docList.length === 0 ? 1 : maxHeading === 1 ? 2 : 3; + // newDoc.heading = heading; FormattedTextBox.SelectOnLoad = newDoc[Id]; FormattedTextBox.SelectOnLoadChar = forceEmptyNote ? "" : " "; return this.props.addDocument?.(newDoc) || false; @@ -132,11 +133,6 @@ export class CollectionNoteTakingViewFieldColumn extends React.Component -- cgit v1.2.3-70-g09d2