1

I have a simple table with a drag and drop feature. It works fine when there is no horizontal scroll but with a horizontal scroll it is not working properly.

Image With Horizontal scroll

and

Image Without Horizontal Issue

I want the same behavior of dragging while with horizontal scrolling.

JsFiddle Link: https://jsfiddle.net/fhnoc28x/4/

scrollPosition = getScrollPosition()[0];
edge.page.x *= X < screen.width / 2 ? -1 : 1;
if (!((edge.page.x < 0 && scrollPosition <= 0) || (edge.page.x > 0 && scrollPosition >= (scrollData.width - screen.width)))) {
  if (edge.flag.x++ === 0) {
    // call window autoscroll
    autoScrollX(window);
  }
}

`

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • This link may be help you : https://stackoverflow.com/questions/2481350/how-to-get-scrollbar-position-with-javascript – Rayees AC Aug 14 '20 at 05:30
  • 1
    Does this answer your question? [How to get scrollbar position with Javascript?](https://stackoverflow.com/questions/2481350/how-to-get-scrollbar-position-with-javascript) – U3.1415926 Aug 14 '20 at 07:16

0 Answers0