Fixed scroll end thing

This commit is contained in:
Max Lynch
2013-10-28 10:42:59 -05:00
parent 9afb405b77
commit a3edee2ff9
3 changed files with 14 additions and 4 deletions

9
dist/js/ionic.js vendored
View File

@ -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() {

View File

@ -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() {

View File

@ -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
});
}
});
}