diff options
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionNoteTakingView.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx index 79e3c5f4b..e7d7c15d2 100644 --- a/src/client/views/collections/CollectionNoteTakingView.tsx +++ b/src/client/views/collections/CollectionNoteTakingView.tsx @@ -648,8 +648,11 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti // } // } - setColumnStartXCoords = (newCoords: number[]) => { - this.columnStartXCoords = newCoords + @action + setColumnStartXCoords = (movementX: number, colIndex: number) => { + const coords = [...this.columnStartXCoords] + coords[colIndex] += movementX + this.columnStartXCoords = coords console.log(this.columnStartXCoords) } @@ -670,8 +673,7 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti if (i < sections.length - 1) { eles.push( <CollectionNoteTakingViewDivider - index={i} - columnStartXCoords={this.columnStartXCoords} + index={i + 1} setColumnStartXCoords={this.setColumnStartXCoords.bind(this)} xMargin={this.xMargin} /> |