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

6
dist/js/ionic.js vendored
View File

@ -2066,7 +2066,7 @@ window.ionic = {
// 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() {},
@ -2524,7 +2524,9 @@ window.ionic = {
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));

View File

@ -119,7 +119,7 @@
};
$scope.items = [];
for(var i = 0; i < 20; i++) {
for(var i = 0; i < 5; i++) {
$scope.items.push({
text: 'Item ' + i,
canDelete: true,

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));