mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(sideMenu): remove translate3d when not needed, close #636
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
}
|
||||
|
||||
.menu-content {
|
||||
@include transform(none);
|
||||
box-shadow: $menu-side-shadow;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user