mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
the first 50px are excluded from the scrolling hide mechanism
This commit is contained in:
parent
4ae4edf000
commit
e6f2d14fee
@ -300,11 +300,13 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleScroll() {
|
handleScroll() {
|
||||||
const currentScrollPos = window.pageYOffset
|
const currentScrollPos = window.pageYOffset
|
||||||
|
if (this.prevScrollpos > 50) {
|
||||||
if (this.prevScrollpos > currentScrollPos) {
|
if (this.prevScrollpos > currentScrollPos) {
|
||||||
this.hideNavbar = false
|
this.hideNavbar = false
|
||||||
} else {
|
} else {
|
||||||
this.hideNavbar = true
|
this.hideNavbar = true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.prevScrollpos = currentScrollPos
|
this.prevScrollpos = currentScrollPos
|
||||||
},
|
},
|
||||||
toggleMobileMenuView() {
|
toggleMobileMenuView() {
|
||||||
|
|||||||
@ -213,6 +213,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleScroll() {
|
handleScroll() {
|
||||||
const currentScrollPos = window.pageYOffset
|
const currentScrollPos = window.pageYOffset
|
||||||
|
if (this.prevScrollpos > 50) {
|
||||||
if (this.prevScrollpos > currentScrollPos) {
|
if (this.prevScrollpos > currentScrollPos) {
|
||||||
this.hideByScroll = false
|
this.hideByScroll = false
|
||||||
} else {
|
} else {
|
||||||
@ -220,6 +221,7 @@ export default {
|
|||||||
this.hideByScroll = true
|
this.hideByScroll = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.prevScrollpos = currentScrollPos
|
this.prevScrollpos = currentScrollPos
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user