mirror of https://github.com/BTCPrivate/copay.git
fix swipe left to hide sidebar
This commit is contained in:
parent
f583cee616
commit
784cd579bd
|
@ -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">
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue