novel icon indicating copy to clipboard operation
novel copied to clipboard

feat: auto scroll when dragging

Open andrewdoro opened this issue 11 months ago • 0 comments

Describe the feature you'd like to request

Implement auto scroll when dragging. Currently dragging in based on the native HTML integration.

https://github.com/steven-tey/novel/assets/17547035/2462a10d-ade9-4f05-870d-2bdb7ce2c669

Added this PR for an example implementation but I am not confident is a good solution #340

Describe the solution you'd like to see

  • [ ] auto scroll based on acceleration and speed
  • [ ] customizable speed
  • [ ] take into account scroll container not being the window object

I've seen this solution in dnd-kit but needs to be adpated for our use case with Tiptap: https://github.com/clauderic/dnd-kit/blob/694dcc2f62e5269541fc941fa6c9af46ccd682ad/packages/core/src/hooks/utilities/useAutoScroller.ts#L4

Additional information

No response

andrewdoro avatar Mar 10 '24 09:03 andrewdoro