Skip to content

Auto scroll option #3356

Description

@Briix

Hi,

How would you feel about adding some options for controlling when the auto scroll gets triggered?

We're using gridstack to lay out a configurable widget grid and we're experiencing that people have troubled rearranging the widgets in the grid because the widgets are often somewhat big and easily touch the vertical edges of the container. On top of this we have a sticky header that sits over the grid which is somehow keeping the auto scroll from triggering at the top edge.

I did a bit of experimenting of my own and found that in our case it feels a lot more natural to scroll based on the cursor position instead of the dragged/resized item's boundary box. For us a 20px offset from the cursor (plus a bit to account for the sticky header) was the sweet spot, but I could see this change from project to project.

Would you be open to have an option to set the auto scroll trigger to be based on cursor position, and maybe with optional offset parameters?

Would be happy to contribute the code myself but wanted to check first if this was even something you were interested in having in your library

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions