Skip to content

Commit 08d7425

Browse files
dennybiasiolliadamdbradley
authored andcommitted
fix(menu): proper setting of leftShowing flag
* fix(menu): proper setting of leftShowing flag * fix(menu): optimized setting of leftShowing and rightShowing flag
1 parent 491e256 commit 08d7425

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Diff for: js/angular/controller/sideMenuController.js

+8-13
Original file line numberDiff line numberDiff line change
@@ -204,20 +204,15 @@ function($scope, $attrs, $ionicSideMenuDelegate, $ionicPlatform, $ionicBody, $io
204204

205205
self.content.setTranslateX(amount);
206206

207-
if (amount >= 0) {
208-
leftShowing = true;
209-
rightShowing = false;
210-
211-
if (amount > 0) {
212-
// Push the z-index of the right menu down
213-
self.right && self.right.pushDown && self.right.pushDown();
214-
// Bring the z-index of the left menu up
215-
self.left && self.left.bringUp && self.left.bringUp();
216-
}
207+
leftShowing = amount > 0;
208+
rightShowing = amount < 0;
209+
210+
if (amount > 0) {
211+
// Push the z-index of the right menu down
212+
self.right && self.right.pushDown && self.right.pushDown();
213+
// Bring the z-index of the left menu up
214+
self.left && self.left.bringUp && self.left.bringUp();
217215
} else {
218-
rightShowing = true;
219-
leftShowing = false;
220-
221216
// Bring the z-index of the right menu up
222217
self.right && self.right.bringUp && self.right.bringUp();
223218
// Push the z-index of the left menu down

0 commit comments

Comments
 (0)