diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 2b3ebcfe71..a93e58d01e 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -641,6 +641,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) isEditing: '=', deleteIcon: '@', reorderIcon: '@', + hasPullToRefresh: '@', onRefresh: '&', onRefreshOpening: '&' }, @@ -663,7 +664,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) var lv = new ionic.views.ListView({ el: $element[0], listEl: $element[0].children[0], - hasPullToRefresh: (typeof $scope.onRefresh !== 'undefined'), + hasPullToRefresh: (typeof $scope.hasPullToRefresh !== 'false'), onRefresh: function() { $scope.onRefresh(); }, diff --git a/dist/js/ionic.js b/dist/js/ionic.js index facf3265eb..fb9933e15e 100644 --- a/dist/js/ionic.js +++ b/dist/js/ionic.js @@ -2411,6 +2411,7 @@ window.ionic = { var parentWidth = this.el.parentNode.offsetWidth; var parentHeight = this.el.parentNode.offsetHeight; + /* var maxX = Math.min(0, (-totalWidth + parentWidth)); var maxY = Math.min(0, (-totalHeight + parentHeight)); @@ -2418,6 +2419,7 @@ window.ionic = { if((this.isHorizontalEnabled && maxX == 0) || (this.isVerticalEnabled && maxY == 0)) { return; } + */ this.x = scrollLeft; this.y = scrollTop; @@ -3176,8 +3178,6 @@ window.ionic = { this._isDragging = false; - console.log(e.gesture.direction); - // Check if this is a reorder drag if(ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_DRAG_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) { var item = this._getItem(e.target); diff --git a/js/ext/angular/src/directive/ionicList.js b/js/ext/angular/src/directive/ionicList.js index 2dbbf3bbfe..026597a62c 100644 --- a/js/ext/angular/src/directive/ionicList.js +++ b/js/ext/angular/src/directive/ionicList.js @@ -84,6 +84,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) isEditing: '=', deleteIcon: '@', reorderIcon: '@', + hasPullToRefresh: '@', onRefresh: '&', onRefreshOpening: '&' }, @@ -106,7 +107,7 @@ angular.module('ionic.ui.list', ['ngAnimate']) var lv = new ionic.views.ListView({ el: $element[0], listEl: $element[0].children[0], - hasPullToRefresh: (typeof $scope.onRefresh !== 'undefined'), + hasPullToRefresh: (typeof $scope.hasPullToRefresh !== 'false'), onRefresh: function() { $scope.onRefresh(); }, diff --git a/js/ext/angular/test/list.html b/js/ext/angular/test/list.html index 4ba5bb714a..915f46cf13 100644 --- a/js/ext/angular/test/list.html +++ b/js/ext/angular/test/list.html @@ -64,9 +64,19 @@
- - - + + + +
+ +
+
angular.module('navTest', ['ionic.ui.list', 'ionic.ui.content', 'ngAnimate']) - .directive('spinner', function() { - return { - restrict: 'E', - replace: true, - scope: { - ratio: '=' - }, - template: '
', - link: function($scope, $element, $attr) { - $scope.$watch('ratio', function(value) { - if(value > 0.97) { - value = 1; - } - - var a = (value * 360) % 360; - var r = (a * Math.PI) / 180; - var x = (Math.sin(r) * 20) + 14; - var y = (Math.cos(r) * -20) + 14; - - $element[0].firstElementChild.style.webkitTransform = 'translate3d(' + x + 'px, ' + y + 'px, 0)'; - //$element[0].firstElementChild.setAttribute('d', anim); - }); - } - } - }) - .controller('TestCtrl', function($scope) { $scope.refreshRatio = { ratio: 0 }; var removeItem = function(item) { diff --git a/js/views/listView.js b/js/views/listView.js index 6e0ea87ecc..8d8986f765 100644 --- a/js/views/listView.js +++ b/js/views/listView.js @@ -376,8 +376,6 @@ this._isDragging = false; - console.log(e.gesture.direction); - // Check if this is a reorder drag if(ionic.DomUtil.getParentOrSelfWithClass(e.target, ITEM_DRAG_CLASS) && (e.gesture.direction == 'up' || e.gesture.direction == 'down')) { var item = this._getItem(e.target); diff --git a/js/views/scrollView.js b/js/views/scrollView.js index e23d38bdc4..f1c51d9030 100644 --- a/js/views/scrollView.js +++ b/js/views/scrollView.js @@ -463,6 +463,7 @@ var parentWidth = this.el.parentNode.offsetWidth; var parentHeight = this.el.parentNode.offsetHeight; + /* var maxX = Math.min(0, (-totalWidth + parentWidth)); var maxY = Math.min(0, (-totalHeight + parentHeight)); @@ -470,6 +471,7 @@ if((this.isHorizontalEnabled && maxX == 0) || (this.isVerticalEnabled && maxY == 0)) { return; } + */ this.x = scrollLeft; this.y = scrollTop;