ScrollView:getContentPosition() issues

In reached positions in left/right/top/bottom sides ScrollView:getContentPosition() returns wrong coords (x/y) . Visually a content stopped, but coords shows like it moves ±10px if you move cursor beyond the limits of ScrollView.

 if ( phase == "began" ) then print( "Scroll view was touched" ) elseif ( phase == "moved" ) then x, y = event.target:getContentPosition() elseif ( phase == "ended" ) then print( "Scroll view was released" ) end if ( event.limitReached ) then if ( event.direction == "up" ) then print( "Reached top limit" ) elseif ( event.direction == "down" ) then print( "Reached bottom limit" ) elseif ( event.direction == "left" ) then print( "Reached left limit" ) elseif ( event.direction == "right" ) then print( "Reached right limit" ) end print ("X=",x, "Y=",y) end

Please help, how to resolve it?

The coordinates should be relative to the scrollview.

You can try :

“scrollView._view.y” and “scrollView._view.x” to see whether you want such coordinates. More here : 

http://forums.coronalabs.com/topic/41478-scrollview-y-position-currently-being-viewed/

Thanks a lot for your answer!

yosu, I’ve tried to use scroll._view.x - result is the same (((

The coordinates should be relative to the scrollview.

You can try :

“scrollView._view.y” and “scrollView._view.x” to see whether you want such coordinates. More here : 

http://forums.coronalabs.com/topic/41478-scrollview-y-position-currently-being-viewed/

Thanks a lot for your answer!

yosu, I’ve tried to use scroll._view.x - result is the same (((