mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed #461 - PTR Android
This commit is contained in:
4
dist/js/ionic-angular.js
vendored
4
dist/js/ionic-angular.js
vendored
@@ -90,6 +90,10 @@ angular.module('ionic.ui.service.scrollDelegate', [])
|
||||
}, element[0]);
|
||||
},
|
||||
|
||||
finishRefreshing: function($scope) {
|
||||
$scope.$broadcast('scroll.refreshComplete');
|
||||
},
|
||||
|
||||
/**
|
||||
* Attempt to get the current scroll view in scope (if any)
|
||||
*
|
||||
|
||||
2
dist/js/ionic-angular.min.js
vendored
2
dist/js/ionic-angular.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/ionic.js
vendored
2
dist/js/ionic.js
vendored
@@ -3667,7 +3667,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
if (scrollTop > maxScrollTop || scrollTop < 0) {
|
||||
|
||||
// Slow down on the edges
|
||||
if (self.options.bouncing) {
|
||||
if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {
|
||||
|
||||
scrollTop += (moveY / 2 * this.options.speedMultiplier);
|
||||
|
||||
|
||||
2
dist/js/ionic.min.js
vendored
2
dist/js/ionic.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -30,6 +30,10 @@ angular.module('ionic.ui.service.scrollDelegate', [])
|
||||
}, element[0]);
|
||||
},
|
||||
|
||||
finishRefreshing: function($scope) {
|
||||
$scope.$broadcast('scroll.refreshComplete');
|
||||
},
|
||||
|
||||
/**
|
||||
* Attempt to get the current scroll view in scope (if any)
|
||||
*
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
on-scroll-complete="onScrollComplete(scrollTop, scrollLeft)"
|
||||
on-refresh="onRefresh()"
|
||||
on-refresh-opening="onRefreshOpening(amount)"
|
||||
refresh-complete="refreshComplete"
|
||||
padding="true"
|
||||
has-tabs="true"
|
||||
has-header="true"
|
||||
>
|
||||
<refresher></refresher>
|
||||
<div id="search-box" class="bar bar-header item-input-inset">
|
||||
<label class="item-input-wrapper">
|
||||
<i class="icon ion-ios7-search placeholder-icon"></i>
|
||||
@@ -136,7 +136,7 @@
|
||||
});
|
||||
})
|
||||
|
||||
.controller('ThisCtrl', function($scope) {
|
||||
.controller('ThisCtrl', function($scope, $timeout, $ionicScrollDelegate) {
|
||||
var header = document.getElementById('header');
|
||||
var content = document.getElementById('container');
|
||||
var startTop = header.offsetTop;
|
||||
@@ -146,6 +146,11 @@
|
||||
console.log('Adding!');
|
||||
};
|
||||
var last = 0;
|
||||
$scope.onRefresh = function() {
|
||||
$timeout(function() {
|
||||
$ionicScrollDelegate.finishRefreshing($scope);
|
||||
}, 1000);
|
||||
};
|
||||
$scope.onScroll = function(event, scrollTop, scrollLeft) {
|
||||
/*
|
||||
if(scrollTop > startTop) {
|
||||
|
||||
@@ -1496,7 +1496,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
if (scrollTop > maxScrollTop || scrollTop < 0) {
|
||||
|
||||
// Slow down on the edges
|
||||
if (self.options.bouncing) {
|
||||
if (self.options.bouncing || (self.__refreshHeight && scrollTop < 0)) {
|
||||
|
||||
scrollTop += (moveY / 2 * this.options.speedMultiplier);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user