run onScroll() within triggerScrollEvent()

This commit is contained in:
Adam Bradley
2014-05-06 08:30:12 -05:00
parent ae8f49e1de
commit 56db0b74ba

View File

@@ -380,7 +380,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
self.resize();
}, 1000, true);
this.onScroll = function(scrollTop) {
this.onScroll = function() {
if(!ionic.scroll.isScrolling) {
setTimeout(self.setScrollStart, 50);
@@ -403,6 +403,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
};
this.triggerScrollEvent = ionic.throttle(function() {
self.onScroll();
ionic.trigger('scroll', {
scrollTop: self.__scrollTop,
scrollLeft: self.__scrollLeft,