mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(sideMenu) - removed throttle for #738
This commit is contained in:
20
js/ext/angular/src/directive/ionicSideMenu.js
vendored
20
js/ext/angular/src/directive/ionicSideMenu.js
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user