How to move dragable element in container instead of page scroll?


#1

Hello everyone,

I made a quick example of a problem so you can get the general idea what I am taking about here http://jsfiddle.net/L027cdds/28/. (Just a general idea, not the exact code)

In my Ionic app when it is installed on device (galaxy s5) if I tap and try to move the image, it scrolls entire page instead (page horizontal and vertical scrolls should be there!). If I test in on browser emulators - it works as expected, I can move the image and page scroll separately.

Is it possible to work with specific object (drag, zoom in/out the objects and etc.) that are inside some specific container instead of moving the entire page? Could you point me the right direction pls? :smile:


#2

you can try to disable the scrolling of the scrollview during your are dragging the image.


#3

It doesn’t seem to help. I stop main content from scrolling, but the image does not move.

I tried to make it work with many diferent ways…
$ionicScrollDelegate.freezeAllScrolls(true); - it just stops the scroll - image does not move.
setting custom functions on on-drag-left, on-drag-right … I catch the drag motion, but what should I do next?

Could you post a short example, because I cant make this work… Maybe I’m just missing some basic stuff.