From a3edee2ff908643bcca2faffbeb139b0e8c8967b Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 28 Oct 2013 10:42:59 -0500 Subject: [PATCH] Fixed scroll end thing --- dist/js/ionic.js | 9 +++++++-- js/views/listViewScroll.js | 2 -- js/views/scrollView.js | 7 +++++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/dist/js/ionic.js b/dist/js/ionic.js index 4606aba909..f329226704 100644 --- a/dist/js/ionic.js +++ b/dist/js/ionic.js @@ -2380,6 +2380,13 @@ window.ionic = { } _this.scrollTo(newX, newY, time, easing); + } else { + // We are done + ionic.trigger(_this.scrollEndEventName, { + target: _this.el, + scrollLeft: _this.x, + scrollTop: _this.y + }); } }); } @@ -3354,7 +3361,6 @@ window.ionic = { didScroll: function(e) { console.log('Scrolling', Date.now()); - /* if(this.isVirtual) { var itemHeight = this.itemHeight; var totalItems = this.el.children.length; @@ -3370,7 +3376,6 @@ window.ionic = { var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage); console.log('Showing these nodes:', nodes); } - */ }, _initDrag: function() { diff --git a/js/views/listViewScroll.js b/js/views/listViewScroll.js index 5623f48a08..cda9670cf3 100644 --- a/js/views/listViewScroll.js +++ b/js/views/listViewScroll.js @@ -394,7 +394,6 @@ didScroll: function(e) { console.log('Scrolling', Date.now()); - /* if(this.isVirtual) { var itemHeight = this.itemHeight; var totalItems = this.el.children.length; @@ -410,7 +409,6 @@ var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage); console.log('Showing these nodes:', nodes); } - */ }, _initDrag: function() { diff --git a/js/views/scrollView.js b/js/views/scrollView.js index dcbd4b3563..3e81bee56e 100644 --- a/js/views/scrollView.js +++ b/js/views/scrollView.js @@ -571,6 +571,13 @@ } _this.scrollTo(newX, newY, time, easing); + } else { + // We are done + ionic.trigger(_this.scrollEndEventName, { + target: _this.el, + scrollLeft: _this.x, + scrollTop: _this.y + }); } }); }