diff --git a/dist/js/ionic.js b/dist/js/ionic.js index 8466e911a0..2d4ab2712e 100644 --- a/dist/js/ionic.js +++ b/dist/js/ionic.js @@ -5756,6 +5756,7 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({ * Toggle the left menu to open 100% */ toggleLeft: function() { + this.content.enableAnimation(); var openAmount = this.getOpenAmount(); if(openAmount > 0) { this.openPercentage(0); @@ -5768,6 +5769,7 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({ * Toggle the right menu to open 100% */ toggleRight: function() { + this.content.enableAnimation(); var openAmount = this.getOpenAmount(); if(openAmount < 0) { this.openPercentage(0); @@ -5837,6 +5839,8 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({ * negative value for right menu (only one menu will be visible at a time). */ openAmount: function(amount) { + console.log('OPEN AMOUNT', amount); + var maxLeft = this.left && this.left.width || 0; var maxRight = this.right && this.right.width || 0; @@ -5878,6 +5882,7 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({ * @param {Event} e the gesture event to use for snapping */ snapToRest: function(e) { + console.log('SNAP TO REST'); // We want to animate at the end of this this.content.enableAnimation(); this._isDragging = false; @@ -5936,7 +5941,9 @@ ionic.controllers.NavController = ionic.controllers.ViewController.inherit({ // End a drag with the given event _endDrag: function(e) { - this.snapToRest(e); + if(this._isDragging) { + this.snapToRest(e); + } this._startX = null; this._lastX = null; this._offsetX = null; diff --git a/js/controllers/sideMenuController.js b/js/controllers/sideMenuController.js index 654176ca47..b9a912877f 100644 --- a/js/controllers/sideMenuController.js +++ b/js/controllers/sideMenuController.js @@ -53,6 +53,7 @@ * Toggle the left menu to open 100% */ toggleLeft: function() { + this.content.enableAnimation(); var openAmount = this.getOpenAmount(); if(openAmount > 0) { this.openPercentage(0); @@ -65,6 +66,7 @@ * Toggle the right menu to open 100% */ toggleRight: function() { + this.content.enableAnimation(); var openAmount = this.getOpenAmount(); if(openAmount < 0) { this.openPercentage(0); @@ -134,6 +136,8 @@ * negative value for right menu (only one menu will be visible at a time). */ openAmount: function(amount) { + console.log('OPEN AMOUNT', amount); + var maxLeft = this.left && this.left.width || 0; var maxRight = this.right && this.right.width || 0; @@ -175,6 +179,7 @@ * @param {Event} e the gesture event to use for snapping */ snapToRest: function(e) { + console.log('SNAP TO REST'); // We want to animate at the end of this this.content.enableAnimation(); this._isDragging = false; @@ -233,7 +238,9 @@ // End a drag with the given event _endDrag: function(e) { - this.snapToRest(e); + if(this._isDragging) { + this.snapToRest(e); + } this._startX = null; this._lastX = null; this._offsetX = null;