mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +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
|
// Whether to disable overflow rubber banding when content is small
|
||||||
// enough to fit in the viewport (i.e. doesn't need scrolling)
|
// 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
|
// Called as the refresher is opened, an amount is passed
|
||||||
onRefreshOpening: function() {},
|
onRefreshOpening: function() {},
|
||||||
@ -2524,7 +2524,9 @@ window.ionic = {
|
|||||||
startTime: Date.now()
|
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 maxX = Math.min(0, (-totalWidth + parentWidth));
|
||||||
var maxY = Math.min(0, (-totalHeight + parentHeight));
|
var maxY = Math.min(0, (-totalHeight + parentHeight));
|
||||||
|
|
||||||
|
|||||||
@ -119,7 +119,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
$scope.items = [];
|
$scope.items = [];
|
||||||
for(var i = 0; i < 20; i++) {
|
for(var i = 0; i < 5; i++) {
|
||||||
$scope.items.push({
|
$scope.items.push({
|
||||||
text: 'Item ' + i,
|
text: 'Item ' + i,
|
||||||
canDelete: true,
|
canDelete: true,
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
// Whether to disable overflow rubber banding when content is small
|
// Whether to disable overflow rubber banding when content is small
|
||||||
// enough to fit in the viewport (i.e. doesn't need scrolling)
|
// 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
|
// Called as the refresher is opened, an amount is passed
|
||||||
onRefreshOpening: function() {},
|
onRefreshOpening: function() {},
|
||||||
@ -508,7 +508,9 @@
|
|||||||
startTime: Date.now()
|
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 maxX = Math.min(0, (-totalWidth + parentWidth));
|
||||||
var maxY = Math.min(0, (-totalHeight + parentHeight));
|
var maxY = Math.min(0, (-totalHeight + parentHeight));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user