Skip to content

Commit

Permalink
style(content): fix jshint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed Apr 14, 2015
1 parent 47075e4 commit 7873064
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions js/angular/directive/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
priority: 800,
compile: function(element, attr) {
var innerElement;
var scrollCtrl;

element.addClass('scroll-content ionic-scroll');

Expand Down Expand Up @@ -143,18 +144,11 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
}

// init scroll controller with appropriate options
var scrollCtrl = $controller('$ionicScroll', {
scrollCtrl = $controller('$ionicScroll', {
$scope: $scope,
scrollViewOptions: scrollViewOptions
});

function onScrollComplete() {
$scope.$onScrollComplete({
scrollTop: scrollCtrl.scrollView.__scrollTop,
scrollLeft: scrollCtrl.scrollView.__scrollLeft
});
}

$scope.$on('$destroy', function() {
if (scrollViewOptions) {
scrollViewOptions.scrollingComplete = noop;
Expand All @@ -166,6 +160,13 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
});
}

function onScrollComplete() {
$scope.$onScrollComplete({
scrollTop: scrollCtrl.scrollView.__scrollTop,
scrollLeft: scrollCtrl.scrollView.__scrollLeft
});
}

}
}
};
Expand Down

0 comments on commit 7873064

Please sign in to comment.