mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
Fixed #124 - rubber banding when too small
This commit is contained in:
6
dist/js/ionic.js
vendored
6
dist/js/ionic.js
vendored
@ -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));
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user