Hi,Im using Ionic and try to use ion-scroll to view pictures(need zoom and scroll), now I meet a problem
By default in ion-scroll, the image is always displayed on the top of the scroll area, but what I want is display the image at the center of ion-scroll area, then I try to use scrollTo but it’s not working in this case.
Here is code pen:
In controller, scroll to is not working
$ionicScrollDelegate.$getByHandle('small').scrollTo(0,-10,true);//direction y <0, not working $ionicScrollDelegate.$getByHandle('small').scrollBy(30,50,true);//direction y >0, not working
( direction x is OK, direction y is not ,so the image still stay at the top of the page.)
Does any one ( @mhartington) can help me to resolve this ? or other solution/suggestion? Many thanks and please forgive my pool English~