I've been trying to find a way to keep track of which page the scrollview is on. Here's my scrollview:
var scrollview = new Scrollview({
direction:1,
paginated:true
});
scrollview.sequenceFrom(surfaces);
I couldn't find anything, so as a last resort, I was thinking of calculating the index with getPosition :
scrollview.sync.on('end', function() {
var position = scrollview.getPosition();
...
});
But the values returned are strange:
135.99973778400908
127.17900173310437
79.18730021387734
119.25586098115863
119.13859297279127
142.1383322620501
81.44664852586043
95.12230013491089
There's no sequence to them, even if I set the index of an item to track getPosition(0)
. So I can't really use this.
Is there any way to get the index of the current "page" of the scrollview when paginated is true?