From 7246b040679cd65b7d430a44cd3ad1e9fd0d0574 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Sun, 9 Mar 2014 17:06:10 -0500 Subject: [PATCH] fix(sideMenu) - removed throttle for #738 --- js/ext/angular/src/directive/ionicSideMenu.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/js/ext/angular/src/directive/ionicSideMenu.js b/js/ext/angular/src/directive/ionicSideMenu.js index 2b392e7dc1..c8510f9225 100644 --- a/js/ext/angular/src/directive/ionicSideMenu.js +++ b/js/ext/angular/src/directive/ionicSideMenu.js @@ -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;