From 0cc6c1b7953e2c82ee3c21390b845e886bc806aa Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Fri, 29 Nov 2013 15:59:17 -0600 Subject: [PATCH] Fixed #239 --- dist/css/ionic.css | 3 ++ dist/js/ionic-angular.js | 41 ++++++++++--------- js/ext/angular/src/directive/ionicSideMenu.js | 41 ++++++++++--------- scss/_menu.scss | 4 +- 4 files changed, 48 insertions(+), 41 deletions(-) diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 4ca85e7974..f2619006d7 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -3224,6 +3224,9 @@ a.subdued { .menu-animated { -webkit-transition: transform 200ms ease; -moz-transition: transform 200ms ease; + transition: transform 200ms ease; + -webkit-transition: -webkit-transform 200ms ease; + -moz-transition: -moz-transform 200ms ease; transition: transform 200ms ease; } /** diff --git a/dist/js/ionic-angular.js b/dist/js/ionic-angular.js index 7d89c1a5fa..249ee3a8b3 100644 --- a/dist/js/ionic-angular.js +++ b/dist/js/ionic-angular.js @@ -1836,31 +1836,32 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) * some side menu stuff on the current scope. */ .controller('SideMenuCtrl', ['$scope', function($scope) { - var _this = this; - - angular.extend(this, ionic.controllers.SideMenuController.prototype); - - ionic.controllers.SideMenuController.call(this, { - // Our quick implementation of the left side menu - left: { - width: 270, - }, - - // Our quick implementation of the right side menu - right: { - width: 270, - } - }); - - $scope.sideMenuContentTranslateX = 0; - - $scope.sideMenuController = this; }]) .directive('sideMenus', function() { return { restrict: 'ECA', - controller: 'SideMenuCtrl', + controller: ['$scope', function($scope) { + var _this = this; + + angular.extend(this, ionic.controllers.SideMenuController.prototype); + + ionic.controllers.SideMenuController.call(this, { + // Our quick implementation of the left side menu + left: { + width: 270, + }, + + // Our quick implementation of the right side menu + right: { + width: 270, + } + }); + + $scope.sideMenuContentTranslateX = 0; + + $scope.sideMenuController = this; + }], replace: true, transclude: true, template: '
' diff --git a/js/ext/angular/src/directive/ionicSideMenu.js b/js/ext/angular/src/directive/ionicSideMenu.js index cf19716739..2e7995b9df 100644 --- a/js/ext/angular/src/directive/ionicSideMenu.js +++ b/js/ext/angular/src/directive/ionicSideMenu.js @@ -15,31 +15,32 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture']) * some side menu stuff on the current scope. */ .controller('SideMenuCtrl', ['$scope', function($scope) { - var _this = this; - - angular.extend(this, ionic.controllers.SideMenuController.prototype); - - ionic.controllers.SideMenuController.call(this, { - // Our quick implementation of the left side menu - left: { - width: 270, - }, - - // Our quick implementation of the right side menu - right: { - width: 270, - } - }); - - $scope.sideMenuContentTranslateX = 0; - - $scope.sideMenuController = this; }]) .directive('sideMenus', function() { return { restrict: 'ECA', - controller: 'SideMenuCtrl', + controller: ['$scope', function($scope) { + var _this = this; + + angular.extend(this, ionic.controllers.SideMenuController.prototype); + + ionic.controllers.SideMenuController.call(this, { + // Our quick implementation of the left side menu + left: { + width: 270, + }, + + // Our quick implementation of the right side menu + right: { + width: 270, + } + }); + + $scope.sideMenuContentTranslateX = 0; + + $scope.sideMenuController = this; + }], replace: true, transclude: true, template: '
' diff --git a/scss/_menu.scss b/scss/_menu.scss index ed18d4384c..5ef8d012a4 100644 --- a/scss/_menu.scss +++ b/scss/_menu.scss @@ -32,5 +32,7 @@ } .menu-animated { - @include transition(transform $menu-animation-speed ease); + -webkit-transition: -webkit-transform $menu-animation-speed ease; + -moz-transition: -moz-transform $menu-animation-speed ease; + transition: transform $menu-animation-speed ease; }