mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
Navbar should stay on top when scrolled all the way and also should have no shadow #587
This commit is contained in:
parent
ef75247f79
commit
60387e9436
@ -16,6 +16,7 @@
|
||||
position: relative;
|
||||
transform: translateY(0);
|
||||
transition: transform 0s;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.hide-navbar {
|
||||
|
@ -104,11 +104,10 @@ export class FrameComponent {
|
||||
const down = this.lastScroll.any < scrollPosition;
|
||||
const upDelay = up && this.lastScroll.down > scrollPosition + window.innerHeight * Config.Gallery.NavBar.NavbarShowDelay;
|
||||
const downDelay = down && this.lastScroll.up < scrollPosition - window.innerHeight * Config.Gallery.NavBar.NavbarHideDelay;
|
||||
|
||||
//we are the top where the navbar by default lives
|
||||
if (this.navContainer.nativeElement.offsetHeight > scrollPosition) {
|
||||
// do not force move navbar up when we are scrolling up from bottom
|
||||
if (this.shouldHideNavbar != false) {
|
||||
if (this.shouldHideNavbar != false || scrollPosition <= 0) {
|
||||
this.navbarKeepTop = true;
|
||||
}
|
||||
if (down) { // scroll down
|
||||
|
Loading…
Reference in New Issue
Block a user