aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingView.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-04-28 16:18:36 -0400
committerljungster <parkerljung@gmail.com>2022-04-28 16:18:36 -0400
commita71c320db74ff4b3eb66a4981c035ae423c437ef (patch)
tree5edc2232f2f7bb483becd4b3f9a31927f1cd6f43 /src/client/views/collections/CollectionNoteTakingView.tsx
parentd9ac13fd73568c4ed4ec939a5d63dda455bc4e5f (diff)
best yet?
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingView.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingView.tsx10
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}
/>