aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewDivider.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/CollectionNoteTakingViewDivider.tsx
parentd9ac13fd73568c4ed4ec939a5d63dda455bc4e5f (diff)
best yet?
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewDivider.tsx')
-rw-r--r--src/client/views/collections/CollectionNoteTakingViewDivider.tsx18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewDivider.tsx b/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
index 731ac556e..ed5dc3715 100644
--- a/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
+++ b/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
@@ -3,9 +3,8 @@ import * as React from "react";
interface DividerProps {
index: number
- columnStartXCoords: number[]
xMargin: number
- setColumnStartXCoords: (newCoords: number[]) => void
+ setColumnStartXCoords: (movementX: number, colIndex: number) => void
}
export default class Divider extends React.Component<DividerProps>{
@@ -33,20 +32,7 @@ export default class Divider extends React.Component<DividerProps>{
@action
onPointerMove = ({ movementX }: PointerEvent) => {
- // if (DragManager.docsBeingDragged.length == 0) {
- // //convert client X to how we're doing stuff
- // const xPos = e.clientX + 2 * this.props.xMargin
- // // get difference (-25 is because that's the center of the divider)
- // const xDividerPos = this.props.columnStartXCoords[this.props.index + 1] - 25
- // const diff = xDividerPos - xPos
- // // make a copy of the array
- // const colXCoords = [...this.props.columnStartXCoords]
- // colXCoords[this.props.index + 1] += movementX
- this.props.columnStartXCoords[this.props.index + 1] += movementX
- // this.props.setColumnStartXCoords(colXCoords)
- console.log(this.props.columnStartXCoords)
- // this.props.columnStartXCoords = colXCoords
- // }
+ this.props.setColumnStartXCoords(movementX, this.props.index)
}
render() {