mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
commented out the element height watch; hard-coded timeout seems to work fine
This commit is contained in:
22
js/ext/angular/src/directive/ionicContent.js
vendored
22
js/ext/angular/src/directive/ionicContent.js
vendored
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user