Closed raresn closed 5 years ago
We are in the middle of deploying a new update and would really appreciate some ideas on how to fix this. Thank you!
Here's an easy fix for the bug (in both directions) without messing with the framework internals: Remember to remove the listener when you dispose/close the view.
list.addEventListener(TouchEvent.TOUCH, onSpinnerTouchValidate );
function onSpinnerTouchValidate(e:TouchEvent) {
var t:Touch = e.getTouch(list, TouchPhase.ENDED);
if (t && !list.isScrolling ) {
list.scrollToPosition(
Math.round(list.horizontalScrollPosition / list.horizontalScrollStep) * list.horizontalScrollStep,
Math.round(list.verticalScrollPosition / list.verticalScrollStep) * list.verticalScrollStep,
0.3);
}
}
Crazy! I was just about to report the exact same issue with SlideShowLayout. @roipeker, thanks for the nifty workaround.
It works! Thank you @roipeker ! You saved us a s#itload of time!
Glad to be helpful guys.
Thanks Josh!
Hello, We found the following bug: When creating Spinner list with the elements displayed horizontally, if you move it a little bit it snaps to pages -> which is the wanted result. BUT - if you throw the list left or right and click, it will stop in between the pages, disregarding the page snapping.
Here is the code to replicate: