From fcccc165e085edafab55f8e91ad6d0ee768499af Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Fri, 8 Nov 2013 11:35:26 -0600 Subject: [PATCH] Added support to stop refresh --- dist/js/ionic.js | 15 +++++++++++++++ js/views/scrollView.js | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/dist/js/ionic.js b/dist/js/ionic.js index 8c0fb7256e..81d80ee5f3 100644 --- a/dist/js/ionic.js +++ b/dist/js/ionic.js @@ -2055,6 +2055,21 @@ window.ionic = { }); }, + // Called by user to tell the scroll view to stop pull to refresh + doneRefreshing: function() { + var _this = this; + + this._scrollTo(0, 0, this.refreshEasingTime, this.refreshEasing); + + this._isHoldingRefresh = false; + + // Hide the refresher + setTimeout(function() { + _this._refresher.style.display = 'none'; + _this._isRefresherHidden = true; + }, this.refreshEasingTime); + }, + /** * Scroll to the given X and Y point, taking * the given amount of time, with the given diff --git a/js/views/scrollView.js b/js/views/scrollView.js index ad9ac7b8a5..bfefe6da4e 100644 --- a/js/views/scrollView.js +++ b/js/views/scrollView.js @@ -146,6 +146,21 @@ }); }, + // Called by user to tell the scroll view to stop pull to refresh + doneRefreshing: function() { + var _this = this; + + this._scrollTo(0, 0, this.refreshEasingTime, this.refreshEasing); + + this._isHoldingRefresh = false; + + // Hide the refresher + setTimeout(function() { + _this._refresher.style.display = 'none'; + _this._isRefresherHidden = true; + }, this.refreshEasingTime); + }, + /** * Scroll to the given X and Y point, taking * the given amount of time, with the given