This commit is contained in:
kek7198 2021-12-06 20:56:04 -06:00
parent 87a34d59e0
commit eb26ea29a6

View file

@ -13,17 +13,17 @@ document.getElementsByTagName('body')[0].onscroll = () => {
if (bottomBar != null) {
if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
console.log('this translate y 0 works')
bottomBar.style.transform = "translateY(60px)"
bottomBar.style.transform = "translateY(0px)"
}
else if (currentScrollPos <= 125 && (window.innerHeight + currentScrollPos) < (document.body.offsetHeight - 65)) {
bottomBar.style.transform = "translateY(0px)";
bottomBar.style.transform = "translateY(60px)";
}
else if (prevScrollpos > currentScrollPos && (window.innerHeight + currentScrollPos) >= (document.body.offsetHeight - 65)) {
console.log('this translate y works')
bottomBar.style.transform = "translateY(60px)"
bottomBar.style.transform = "translateY(0px)"
}
else {
bottomBar.style.transform = "translateY(0px)"
bottomBar.style.transform = "translateY(60px)"
}
}