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
|
<body
|
||||||
ng-controller="IndexController"
|
ng-controller="IndexController"
|
||||||
ng-swipe-disable-mouse
|
ng-swipe-disable-mouse
|
||||||
|
ng-swipe-left="swipe()"
|
||||||
ng-swipe-right="swipe(true)">
|
ng-swipe-right="swipe(true)">
|
||||||
|
|
||||||
<div id="loading" class="loadingpage">
|
<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 elem = angular.element(document.querySelector('#off-canvas-wrap'));
|
||||||
var leftbarActive = angular.element(document.getElementsByClassName('move-right')).length;
|
var leftbarActive = angular.element(document.getElementsByClassName('move-right')).length;
|
||||||
var rightbarActive = angular.element(document.getElementsByClassName('move-left')).length;
|
|
||||||
|
|
||||||
if (invert) {
|
if (invert) {
|
||||||
if (rightbarActive) {
|
|
||||||
hideSidebars();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if ($rootScope.iden && !$rootScope.hideNavigation) {
|
if ($rootScope.iden && !$rootScope.hideNavigation) {
|
||||||
elem.addClass('move-right');
|
elem.addClass('move-right');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
if (leftbarActive) {
|
if (leftbarActive) {
|
||||||
hideSidebars();
|
hideSidebars();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if ($rootScope.iden && $rootScope.iden.getWallets().length >1) {
|
|
||||||
elem.addClass('move-left');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue