Skip to content

Commit

Permalink
[REFACTOR] Final changes asked by @Jaifroid
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishabhg71 committed Sep 19, 2023
1 parent 2f0def7 commit 585ee86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ document.getElementById('btnConfigure').addEventListener('click', function (even
document.getElementById('liAboutNav').setAttribute('class', '');
$('.navbar-collapse').collapse('hide');
// Show the selected content in the page
// uiUtil.removeAnimationClasses();

uiUtil.tabTransitionToSection('config', params.showUIAnimations);

Expand All @@ -398,8 +397,8 @@ document.getElementById('btnAbout').addEventListener('click', function (event) {
document.getElementById('liConfigureNav').setAttribute('class', '');
document.getElementById('liAboutNav').setAttribute('class', 'active');
$('.navbar-collapse').collapse('hide');

// Show the selected content in the page
// uiUtil.removeAnimationClasses();
uiUtil.tabTransitionToSection('about', params.showUIAnimations);

// Use a timeout of 400ms because uiUtil.applyAnimationToSection uses a timeout of 300ms
Expand Down
3 changes: 2 additions & 1 deletion www/js/lib/uiUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ function isElementInView (el, fully) {
return rect.top < window.innerHeight && rect.bottom > 0 && rect.left < window.innerWidth && rect.right > 0;
}
}

/**
* Show elements in bulk (using display: '')
*
Expand Down Expand Up @@ -559,11 +560,11 @@ function fromSection () {
const isConfigPageVisible = !$('#configuration').is(':hidden');
const isAboutPageVisible = !$('#about').is(':hidden');
const isArticlePageVisible = !$('#articleContent').is(':hidden');

if (isConfigPageVisible) return 'config';
else if (isAboutPageVisible) return 'about';
else if (isArticlePageVisible) return 'home';
}

/**
* Adds the slide animation between different sections
*
Expand Down

0 comments on commit 585ee86

Please sign in to comment.