Skip to content

Commit

Permalink
fix: calc absolut element position
Browse files Browse the repository at this point in the history
  • Loading branch information
pmattmann committed Nov 3, 2024
1 parent c80d394 commit 10d9ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/views/camp/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,8 @@ export default {
scrollToToday() {
const element = document.getElementById(this.today.id)
if (element) {
let elementPosition = element.getBoundingClientRect().top
let elementPosition =
element.getBoundingClientRect().top + document.documentElement.scrollTop
if (this.$vuetify.breakpoint.mdAndUp) {
elementPosition = elementPosition - 50
} else if (this.$vuetify.breakpoint.smAndUp) {
Expand Down

0 comments on commit 10d9ffa

Please sign in to comment.