doubletap zooming in ScrollView
Hi. I cannot find any way to zoom scrollview by doubletap.
scrollview.addEventListener('doubletap',function(e)
{
scrollview.zoomScale = 2.0;
});
This doesn't work.
2 Answers
-
NOTE: scrollview have zoomScale, but scrollableview have not.
-
If someone stumbles upon this question while trying to manage the double tap in a photo gallery…
You have to build an array of scrollviews, each one with a maxZoomScale and containing an imageView.
Then:
scrollableView.addEventListener('doubletap', function(e) { var photo = scrollableView.views[scrollableView.currentPage]; (photo.scale <= 1.0) ? photo.zoomScale = 2.0 : photo.zoomScale = 1.0; });
Hope this helps somebody.