aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionNoteTakingViewDivider.tsx
diff options
context:
space:
mode:
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() {