Skip to content

Commit

Permalink
Merge pull request #37 from mahmoodbazdar/master
Browse files Browse the repository at this point in the history
fix digest error on window resize
  • Loading branch information
alalonde committed Nov 9, 2015
2 parents 723b917 + 0fd36f6 commit 94e9ef4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions angular-scrollable-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@
});

angular.element(window).on('resize', function(){
$scope.$apply();
$timeout(function(){
$scope.$apply();
});
});
$scope.$watch(function(){
return $element.find('.scrollArea').width();
Expand Down Expand Up @@ -409,4 +411,4 @@
function _getScale(sizeCss){
return parseInt(sizeCss.replace(/px|%/, ''), 10);
}
})(angular);
})(angular);

0 comments on commit 94e9ef4

Please sign in to comment.