fix(sideMenu) - removed throttle for #738

This commit is contained in:
Max Lynch
2014-03-09 17:06:10 -05:00
parent a51f30ea36
commit 7246b04067

View File

@@ -112,16 +112,18 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture', 'ionic.service.vie
getTranslateX: function() {
return $scope.sideMenuContentTranslateX || 0;
},
setTranslateX: ionic.animationFrameThrottle(function(amount) {
if(amount === 0) {
$element[0].style[ionic.CSS.TRANSFORM] = 'none';
} else {
$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';
}
$timeout(function() {
$scope.sideMenuContentTranslateX = amount;
setTranslateX: function(amount) {
ionic.requestAnimationFrame(function() {
if(amount === 0) {
$element[0].style[ionic.CSS.TRANSFORM] = 'none';
} else {
$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';
}
$timeout(function() {
$scope.sideMenuContentTranslateX = amount;
});
});
}),
},
enableAnimation: function() {
//this.el.classList.add(this.animateClass);
$scope.animationEnabled = true;