Skip to content

Commit

Permalink
fix(scroll): rename 'scroll.resize' to 'scroll-resize' for jQuery's sake
Browse files Browse the repository at this point in the history
Closes #3384.
  • Loading branch information
ajoslin committed Apr 15, 2015
1 parent 4b75b73 commit e19863c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/angular/controller/scrollController.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function($scope,

self.resize = function() {
return $timeout(resize, 0, false).then(function() {
$element && $element.triggerHandler('scroll.resize');
$element && $element.triggerHandler('scroll-resize');
});
};

Expand Down
4 changes: 2 additions & 2 deletions js/angular/directive/collectionRepeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
initDimensions();

// Dimensions are refreshed on resize or data change.
scrollCtrl.$element.on('scroll.resize', refreshDimensions);
scrollCtrl.$element.on('scroll-resize', refreshDimensions);

angular.element($window).on('resize', onResize);
var unlistenToExposeAside = $rootScope.$on('$ionicExposeAside', ionic.animationFrameThrottle(function() {
Expand Down Expand Up @@ -173,7 +173,7 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
scope.$on('$destroy', function() {
angular.element($window).off('resize', onResize);
unlistenToExposeAside();
scrollCtrl.$element && scrollCtrl.$element.off('scroll.resize', refreshDimensions);
scrollCtrl.$element && scrollCtrl.$element.off('scroll-resize', refreshDimensions);

computedStyleNode && computedStyleNode.parentNode &&
computedStyleNode.parentNode.removeChild(computedStyleNode);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/angular/directive/collectionRepeat.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ describe('collectionRepeat', function() {
expect(activeItems().length).toEqual(3);

scrollView.__clientHeight = 30;
scrollCtrl.$element.triggerHandler('scroll.resize');
scrollCtrl.$element.triggerHandler('scroll-resize');
expect(activeItems().length).toEqual(2);
}));
});
Expand Down

0 comments on commit e19863c

Please sign in to comment.