You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if it is possible to get an event each time an item is passed?
Think of the iPhone calendar scroll-list, where it fires a tick-sound each time an item is centered.
I thought that the cycle-event was what I was looking for, but I guess it's not.
The text was updated successfully, but these errors were encountered:
There isn't an event that does this, and I don't think I'll be adding it. Things like this are I think in a definition of feature creep :) which Sly is already very guilty of.
But! you can implement it with existing API.
Listen for move event, which fires every time a movement frame is rendered (synced with requestAnimationFrame), and inside it, check sly.rel object, which has useful properties like firstItem (first visible item in a frame), lastItem (last visible), etc.
Than just cache the index of a desired property, and fire an event when it changes.
I was wondering if it is possible to get an event each time an item is passed?
Think of the iPhone calendar scroll-list, where it fires a tick-sound each time an item is centered.
I thought that the
cycle
-event was what I was looking for, but I guess it's not.The text was updated successfully, but these errors were encountered: