From a71c320db74ff4b3eb66a4981c035ae423c437ef Mon Sep 17 00:00:00 2001 From: ljungster Date: Thu, 28 Apr 2022 16:18:36 -0400 Subject: best yet? --- .../collections/CollectionNoteTakingViewDivider.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/client/views/collections/CollectionNoteTakingViewDivider.tsx') 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{ @@ -33,20 +32,7 @@ export default class Divider extends React.Component{ @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() { -- cgit v1.2.3-70-g09d2