faster JS from swipe
This commit is contained in:
parent
cb675ba2ba
commit
3c598fb4d0
1 changed files with 5 additions and 8 deletions
|
|
@ -7,23 +7,20 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
|
||||||
if (typeof document === 'undefined')
|
if (typeof document === 'undefined')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// hack to hide sidebars and use ng-click (no href=)
|
var elem = document.getElementById('off-canvas-wrap');
|
||||||
var win = angular.element($window);
|
elem.className = 'off-canvas-wrap';
|
||||||
var elem = angular.element(document.querySelector('#off-canvas-wrap'))
|
|
||||||
elem.removeClass('move-right');
|
|
||||||
elem.removeClass('move-left');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var toggleSidebar = function(invert) {
|
var toggleSidebar = function(invert) {
|
||||||
if (typeof document === 'undefined')
|
if (typeof document === 'undefined')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var elem = angular.element(document.querySelector('#off-canvas-wrap'));
|
var elem = document.getElementById('off-canvas-wrap');
|
||||||
var leftbarActive = angular.element(document.getElementsByClassName('move-right')).length;
|
var leftbarActive = elem.className.indexOf('move-right') >= 0;
|
||||||
|
|
||||||
if (invert) {
|
if (invert) {
|
||||||
if (profileService.profile && !$rootScope.hideNavigation) {
|
if (profileService.profile && !$rootScope.hideNavigation) {
|
||||||
elem.addClass('move-right');
|
elem.className = 'off-canvas-wrap move-right';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (leftbarActive) {
|
if (leftbarActive) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue