From 7b7374c4b20a0488c74b49cdc50daa6867dce2a9 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 5 Aug 2022 10:51:55 -0400 Subject: fixed undo of adding column in notetaking view --- .../views/collections/CollectionNoteTakingView.tsx | 25 +++++++++++++++++----- .../collections/CollectionNoteTakingViewColumn.tsx | 1 + 2 files changed, 21 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index e0c79a265..c07473ee1 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -44,8 +44,8 @@ export type collectionNoteTakingViewProps = { export class CollectionNoteTakingView extends CollectionSubView>() { _disposers: { [key: string]: IReactionDisposer } = {}; _masonryGridRef: HTMLDivElement | null = null; - _draggerRef = React.createRef(); - @observable columnStartXCoords: number[] = []; + _draggerRef = React.createRef(); // change to relative widths for deleting. change storage from columnStartXCoords to columnHeaders (schemaHeaderFields has a widgth alrady) + @observable columnStartXCoords: number[] = []; // columnHeaders -- SchemaHeaderField -- widht @observable docsDraggedRowCol: number[] = []; @observable _cursor: CursorProperty = 'grab'; @observable _scroll = 0; // used to force the document decoration to update when scrolling @@ -58,6 +58,22 @@ export class CollectionNoteTakingView extends CollectionSubView { return !d[this.notetakingCategoryField] && !columnHeaders.find(sh => sh.heading === 'unset'); }); + + // @#Oberable draggedColIndex = ... + //@observable cloneDivXYcoords + // @observable clonedDiv... + + // render() { + // { this.clonedDiv ?
([new SchemaHeaderField('New Column')]); // add all of the docs that have not been added to a column to this new column - } else { - this.resizeColumns(this.columnHeaders.length); } } @@ -573,6 +587,7 @@ export class CollectionNoteTakingView extends CollectionSubView { if (value && this.columnHeaders) { @@ -618,7 +633,7 @@ export class CollectionNoteTakingView extends CollectionSubView Transform; observeHeight: (myref: any) => void; unobserveHeight: (myref: any) => void; + //setDraggedCol:(clonedDiv:any, header:SchemaHeaderField, xycoors: ) editableViewProps: () => any; resizeColumns: (n: number) => void; columnStartXCoords: number[]; -- cgit v1.2.3-70-g09d2