Updated to lock the navbar on changeMode
This commit is contained in:
parent
c9f35b9aa0
commit
33cdec2fd4
2 changed files with 12 additions and 1 deletions
|
@ -550,6 +550,7 @@ function toggleMode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeMode(type) {
|
function changeMode(type) {
|
||||||
|
lockNavbar();
|
||||||
saveInfo();
|
saveInfo();
|
||||||
if (type)
|
if (type)
|
||||||
currentMode = type;
|
currentMode = type;
|
||||||
|
@ -616,6 +617,16 @@ function changeMode(type) {
|
||||||
ui.toolbar.view.addClass("active");
|
ui.toolbar.view.addClass("active");
|
||||||
modeIcon.addClass('fa-toggle-on');
|
modeIcon.addClass('fa-toggle-on');
|
||||||
}
|
}
|
||||||
|
unlockNavbar();
|
||||||
|
}
|
||||||
|
|
||||||
|
function lockNavbar() {
|
||||||
|
$('.navbar').addClass('locked');
|
||||||
|
}
|
||||||
|
|
||||||
|
var unlockNavbar = _.debounce(function () {
|
||||||
|
$('.navbar').removeClass('locked');
|
||||||
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
//button actions
|
//button actions
|
||||||
|
|
2
public/vendor/showup/showup.js
vendored
2
public/vendor/showup/showup.js
vendored
|
@ -36,7 +36,7 @@
|
||||||
target.clearQueue();
|
target.clearQueue();
|
||||||
target.stop();
|
target.stop();
|
||||||
var currentScroll = $(this).scrollTop();
|
var currentScroll = $(this).scrollTop();
|
||||||
if (currentScroll > hideOffset) {
|
if (currentScroll > hideOffset && !target.hasClass('locked')) {
|
||||||
if(Math.abs(previousScroll - currentScroll) < 50) return;
|
if(Math.abs(previousScroll - currentScroll) < 50) return;
|
||||||
if (currentScroll > previousScroll) {
|
if (currentScroll > previousScroll) {
|
||||||
// Action on scroll down
|
// Action on scroll down
|
||||||
|
|
Loading…
Reference in a new issue