commented out the element height watch; hard-coded timeout seems to work fine

This commit is contained in:
Travis Russi
2013-11-30 17:34:10 -08:00
parent 2485b4a597
commit ebdc712e7d

View File

@@ -72,17 +72,17 @@ angular.module('ionic.ui.content', [])
$timeout(function() {
// Add watch to the container element's height to fire Scroller.resize event
$scope.$watch
(
function () {
return typeof($element) !== "undefined" && $element.length > 0 && $element[0].clientHeight > 0 ? $element[0].clientHeight : 0;
},
function (newValue, oldValue) {
if (newValue != oldValue && $scope.$parent && $scope.$parent.scrollView && $scope.$parent.scrollView.resize) {
$scope.$parent.scrollView.resize();
}
}
);
// $scope.$watch
// (
// function () {
// return typeof($element) !== "undefined" && $element.length > 0 && $element[0].clientHeight > 0 ? $element[0].clientHeight : 0;
// },
// function (newValue, oldValue) {
// if (newValue != oldValue && $scope.$parent && $scope.$parent.scrollView && $scope.$parent.scrollView.resize) {
// $scope.$parent.scrollView.resize();
// }
// }
// );
sv = new ionic.views.Scroller({
el: $element[0]