mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
Fixed #56 - pull to drag
This commit is contained in:
@ -477,21 +477,24 @@
|
||||
// Grab the refresher element if using Pull to Refresh
|
||||
if(this.hasPullToRefresh) {
|
||||
this._refresher = document.querySelector('.scroll-refresher');
|
||||
this._refresherHeight = parseFloat(this._refresher.firstElementChild.offsetHeight) || 100;
|
||||
// We always start the refresher hidden
|
||||
if(this.y < 0) {
|
||||
this._isRefresherHidden = true;
|
||||
this._refresher.style.display = 'none';
|
||||
} else {
|
||||
this._isRefresherHidden = false;
|
||||
this._didTriggerRefresh = false;
|
||||
this._refresher.style.display = 'block';
|
||||
}
|
||||
|
||||
this._isHoldingRefresh = false;
|
||||
|
||||
if(this._refresher) {
|
||||
this._refresher.classList.remove('scroll-refreshing');
|
||||
this._refresherHeight = parseFloat(this._refresher.firstElementChild.offsetHeight) || 100;
|
||||
// We always start the refresher hidden
|
||||
if(this.y < 0) {
|
||||
this._isRefresherHidden = true;
|
||||
this._refresher.style.display = 'none';
|
||||
} else {
|
||||
this._isRefresherHidden = false;
|
||||
this._didTriggerRefresh = false;
|
||||
this._refresher.style.display = 'block';
|
||||
}
|
||||
|
||||
this._isHoldingRefresh = false;
|
||||
|
||||
if(this._refresher) {
|
||||
this._refresher.classList.remove('scroll-refreshing');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user