Scroll Events
Events.Move— The layer is moving. 译:移动该层Events.ScrollStart— Start scrolling. 译:开始滚动Events.Scroll— While scrolling. 译:当滚动Events.ScrollEnd— End of scroll. 译:滚动结束Events.ScrollAnimationDidStart— Did start momentum/bounce animation. 译:的确开始势头/弹跳动画。Events.ScrollAnimationDidEnd— Did end momentum/bounce animation. 译:真的结束势头/弹跳动画。
scroll = new ScrollComponent
layerA = new Layer
parent: scroll.content
# Returns the event, layer.draggable and the layer
scroll.on Events.ScrollStart, (event, draggable, layer) ->
print event, draggable, layer
Scroll Event Shortcuts
译:滚动事件当快捷键
# For Events.Move
scroll.onMove ->
print "Moving"
# For Events.ScrollStart
scroll.onScrollStart ->
print "Start of scroll"
# For Events.Scroll
scroll.onScroll ->
print "Scrolling"
# For Events.ScrollEnd
scroll.onScrollEnd ->
print "End of scroll"
# For Events.ScrollAnimationDidStart
scroll.onScrollAnimationDidStart ->
print "Start of scroll animation"
# For Events.ScrollAnimationDidEnd
scroll.onScrollAnimationDidEnd ->
print "End of scroll animation"