fix(sideMenu): remove translate3d when not needed, close #636

This commit is contained in:
Adam Bradley
2014-02-20 16:33:40 -06:00
parent e34cda69e4
commit 07092f009c
2 changed files with 6 additions and 1 deletions

View File

@@ -111,7 +111,11 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture', 'ionic.service.vie
return $scope.sideMenuContentTranslateX || 0;
},
setTranslateX: ionic.animationFrameThrottle(function(amount) {
$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';
if(amount > 0) {
$element[0].style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';
} else {
$element[0].style[ionic.CSS.TRANSFORM] = 'none';
}
$timeout(function() {
$scope.sideMenuContentTranslateX = amount;
});

View File

@@ -20,6 +20,7 @@
}
.menu-content {
@include transform(none);
box-shadow: $menu-side-shadow;
}