Skip to content

Commit

Permalink
SPIN-146 // removed planet-animation css fix and added js fix instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sieghard Hillbrecht committed Sep 16, 2024
1 parent d0046c4 commit 85a453f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
14 changes: 11 additions & 3 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,19 @@ function decorateSectionsWithPlanetToBackgroundAnimation(main) {
const nextSection = entry.target.nextElementSibling;
if (entry.isIntersecting) {
entry.target.classList.remove('background-hidden');
previousSection.querySelector('.section-planet').classList.add('hidden');
nextSection.querySelector('.section-planet').classList.add('hidden');
// previousSection.querySelector('.section-planet').classList.add('hidden');
// nextSection.querySelector('.section-planet').classList.add('hidden');
previousSection.querySelectorAll('.section-planet').forEach((planet) => {
planet.classList.add('hidden');
})
nextSection.querySelectorAll('.section-planet').forEach((planet) => {
planet.classList.add('hidden');
})
} else if (entry.boundingClientRect.top > 0) {
entry.target.classList.add('background-hidden');
previousSection.querySelector('.section-planet').classList.remove('hidden');
previousSection.querySelectorAll('.section-planet').forEach((planet) => {
planet.classList.remove('hidden');
})
} else if (entry.boundingClientRect.top < 0) {
entry.target.classList.add('background-hidden');
nextSection.querySelector('.section-planet').classList.remove('hidden');
Expand Down
1 change: 0 additions & 1 deletion styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,6 @@ main .section.hero .icon-logo-adobe-techdivision {
100% {
transform: translateX(-50%) scale(50);
border-radius: 10px;
display: none;
}
}

Expand Down

0 comments on commit 85a453f

Please sign in to comment.