Fixed #124 - rubber banding when too small

This commit is contained in:
Max Lynch
2013-11-12 19:32:46 -06:00
parent 62f6fb27be
commit 623b78966e
3 changed files with 9 additions and 5 deletions

View File

@ -50,7 +50,7 @@
// Whether to disable overflow rubber banding when content is small
// enough to fit in the viewport (i.e. doesn't need scrolling)
disableNonOverflowRubberBand: false,
disableNonOverflowRubberBand: true,
// Called as the refresher is opened, an amount is passed
onRefreshOpening: function() {},
@ -508,7 +508,9 @@
startTime: Date.now()
};
if(this.disableNonOverflowRubberBand === true) {
// If the viewport is too small and we aren't using pull to refresh,
// don't rubber band the drag
if(this.disableNonOverflowRubberBand === true && !this._refresher) {
var maxX = Math.min(0, (-totalWidth + parentWidth));
var maxY = Math.min(0, (-totalHeight + parentHeight));