简体   繁体   中英

Auto Scroll During jQuery Drag

I'm considering adding drag and drop functionality to my Webforms application.

One consideration is that the drag source and drop target may be far enough away from each other to require scrolling. So I thought a cool UI would be for an overlay to appear at the top and bottom of the browser window when the user starts to drag.

This overlay would be a shaded area with an arrow (the top overlay would have an Up arrow and the bottom overlay would have a Down arrow). When the user drags over the overlay, the window would scroll in that direction.

Questions:

  1. Does anyone have any experience with anything like this? Do you know if it can be done reliably across browsers?
  2. Can anyone recommend a jQuery plugin that could do the heavy lifting?
  3. Any other thoughts or recommendations?

I got also some issues with that functionality. I solved it by styling my draggable element with margin: 0 and padding: 0 and make it consistent with a width and a height properties.

More I used margin and padding properties on draggable, sortable and droppable elements more I had issues.

Hope it will help you !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM