Skip to content

Commit

Permalink
Merge pull request #961 from AlejandroSuero/feature/fix-boxer-image-f…
Browse files Browse the repository at this point in the history
…lickering

fix(Gallery): boxer images flickering when updating gallery
  • Loading branch information
midudev authored May 29, 2024
2 parents 7c10364 + d73021e commit a411c04
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/components/Boxers/Gallery.astro
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ const { id, name } = Astro.props
</div>
</section>

<style>
#lightbox img.boxer-gallery-img {
view-transition-name: lightbox-image;
}
</style>

<script>
import { $ } from "@/lib/dom-selector"

Expand Down Expand Up @@ -185,12 +179,7 @@ const { id, name } = Astro.props
link.setAttribute("data-current", "true")

// update de image before show lightbox
if ($lightbox.open && document.startViewTransition) {
document.startViewTransition(() => {
updateImg(link)
})
return
} else {
if ($lightbox.open) {
updateImg(link)
}

Expand Down

0 comments on commit a411c04

Please sign in to comment.