Skip to content

Commit

Permalink
new manual trigger for pull-to-refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
pbakaus committed Nov 12, 2013
1 parent a44d7c2 commit 1fdb75d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,20 @@ var Scroller;
},


/**
* Starts pull-to-refresh manually.
*/
triggerPullToRefresh: function() {
// Use publish instead of scrollTo to allow scrolling to out of boundary position
// We don't need to normalize scrollLeft, zoomLevel, etc. here because we only y-scrolling when pull-to-refresh is enabled
this.__publish(this.__scrollLeft, -this.__refreshHeight, this.__zoomLevel, true);

if (this.__refreshStart) {
this.__refreshStart();
}
},


/**
* Signalizes that pull-to-refresh is finished.
*/
Expand Down

0 comments on commit 1fdb75d

Please sign in to comment.