react-timeline-editor
react-timeline-editor copied to clipboard
Move rows as you are dragging an item
This library is great.
The only thing missing for my use case is the ability to drag an item from one row to another. It would be nice to have an item move rows as you are dragging it and adjusting the droppable ability based on if the item fits and there is no overlap with another item.
First, is this possible currently? If not, has anyone implemented changes to allow this?
Thanks!
I'm working on that right now. Ill share my code if I do figure out a way
do you still need this?
I can help
I ended up forking the repo, otherwise it would be too annoying hack it. I think I fixed it like this:
- use onActionMoving event to determine when the action is moving
- when its moving, get the bounding client rect, scroll amount, & mouse client.Y from the top of the timeline
- xzdarcy rows are indexed from 0, so you can just use some basic math to determine which row to move to
xzdarcy used some jank ahh libraries for handling motion. A better way is to just get client mouse position values