Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Nrosa01 committed Jun 13, 2023
1 parent 034a192 commit 269c055
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/SvelteGallery/lib/CarouselGallery.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@
currentIndex = index;
expanded = true;
loadImage();
// Disable scrolling
document.body.style.overflow = "hidden";
}
function closeImage() {
flyX = 0;
flyY = 20;
expanded = false;
// Enable scrolling
document.body.style.overflow = "auto";
}
function handleClickInside(event) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SvelteGallery/lib/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</script>

{#if enabled}
<li class="lg:h-[25vh] h-[20vw] flex-grow m-2" in:fade="{{ duration: 400 }}">
<li class="lg:h-[25vmin] h-[20vmin] flex-grow m-2" in:fade="{{ duration: 400 }}">
<img
class="max-h-full min-w-full object-cover align-bottom rounded-xl select-none"
src="{image.src}"
Expand Down

0 comments on commit 269c055

Please sign in to comment.