0

I have a web page with images that can be dropped on a canvas div (nothing to do with HTML5) and then dragged around. The problem is that if I drag an image far off to the right the whole page scrolls left to keep the image displayed. I don't want this "auto scroll." When the image gets to the right edge of the viewport, it should stop: you can't drag it any farther. I tried adding containment : 'viewport' to the image dragOps, but that didn't help.

Is there a way I can prevent this auto scrolling?

Thanks

Steve
  • 4,534
  • 9
  • 52
  • 110
  • 1
    Maybe you could listen for mousedown event and prevent scrolling, then listen for mouseup and allow scrolling again? – danwarfel Feb 12 '14 at 02:32
  • Check this post http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily – VIDesignz Feb 12 '14 at 02:56

0 Answers0