fix swipe left to hide sidebar

This commit is contained in:
Gustavo Maximiliano Cortez 2014-12-18 18:58:35 -03:00
parent f583cee616
commit 784cd579bd
2 changed files with 3 additions and 13 deletions

View File

@ -29,6 +29,7 @@
<body
ng-controller="IndexController"
ng-swipe-disable-mouse
ng-swipe-left="swipe()"
ng-swipe-right="swipe(true)">
<div id="loading" class="loadingpage">

View File

@ -20,27 +20,16 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
var elem = angular.element(document.querySelector('#off-canvas-wrap'));
var leftbarActive = angular.element(document.getElementsByClassName('move-right')).length;
var rightbarActive = angular.element(document.getElementsByClassName('move-left')).length;
if (invert) {
if (rightbarActive) {
hideSidebars();
}
else {
if ($rootScope.iden && !$rootScope.hideNavigation) {
elem.addClass('move-right');
}
if ($rootScope.iden && !$rootScope.hideNavigation) {
elem.addClass('move-right');
}
}
else {
if (leftbarActive) {
hideSidebars();
}
else {
if ($rootScope.iden && $rootScope.iden.getWallets().length >1) {
elem.addClass('move-left');
}
}
}
};