mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
Fixed scroll end thing
This commit is contained in:
9
dist/js/ionic.js
vendored
9
dist/js/ionic.js
vendored
@ -2380,6 +2380,13 @@ window.ionic = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_this.scrollTo(newX, newY, time, easing);
|
_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) {
|
didScroll: function(e) {
|
||||||
console.log('Scrolling', Date.now());
|
console.log('Scrolling', Date.now());
|
||||||
/*
|
|
||||||
if(this.isVirtual) {
|
if(this.isVirtual) {
|
||||||
var itemHeight = this.itemHeight;
|
var itemHeight = this.itemHeight;
|
||||||
var totalItems = this.el.children.length;
|
var totalItems = this.el.children.length;
|
||||||
@ -3370,7 +3376,6 @@ window.ionic = {
|
|||||||
var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage);
|
var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage);
|
||||||
console.log('Showing these nodes:', nodes);
|
console.log('Showing these nodes:', nodes);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_initDrag: function() {
|
_initDrag: function() {
|
||||||
|
|||||||
@ -394,7 +394,6 @@
|
|||||||
|
|
||||||
didScroll: function(e) {
|
didScroll: function(e) {
|
||||||
console.log('Scrolling', Date.now());
|
console.log('Scrolling', Date.now());
|
||||||
/*
|
|
||||||
if(this.isVirtual) {
|
if(this.isVirtual) {
|
||||||
var itemHeight = this.itemHeight;
|
var itemHeight = this.itemHeight;
|
||||||
var totalItems = this.el.children.length;
|
var totalItems = this.el.children.length;
|
||||||
@ -410,7 +409,6 @@
|
|||||||
var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage);
|
var nodes = Array.prototype.slice.call(this.el.children, first, itemsPerPage);
|
||||||
console.log('Showing these nodes:', nodes);
|
console.log('Showing these nodes:', nodes);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_initDrag: function() {
|
_initDrag: function() {
|
||||||
|
|||||||
@ -571,6 +571,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
_this.scrollTo(newX, newY, time, easing);
|
_this.scrollTo(newX, newY, time, easing);
|
||||||
|
} else {
|
||||||
|
// We are done
|
||||||
|
ionic.trigger(_this.scrollEndEventName, {
|
||||||
|
target: _this.el,
|
||||||
|
scrollLeft: _this.x,
|
||||||
|
scrollTop: _this.y
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user