Fix Fullscreen double click bug, Default size for photos
- Reset the value of swiped when changing photo
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<source media="(min-width: 768px)" data-srcset={getThumbnail(private_hash, 992)}>
|
||||
<source media="(min-width: 500px)" data-srcset={getThumbnail(private_hash, 650)}>
|
||||
<source media="(min-width: 300px)" data-srcset={getThumbnail(private_hash, 400)}>
|
||||
<img src={layout === 'list' ? 'data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=' : getThumbnail(private_hash, 900)}
|
||||
<img src={getThumbnail(private_hash, 900)}
|
||||
width={defaultWidth} height={defaultHeight}
|
||||
alt={imgAlt}
|
||||
class:lazyload={layout === 'list'}
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
dispatch('photoChange', photos[currentIndex])
|
||||
// Reset fullscreen value if open
|
||||
if ($fullscreen) fullscreen.set()
|
||||
// Reset swiped event if fired
|
||||
swiped = false
|
||||
}
|
||||
|
||||
// Hover on controls
|
||||
@@ -96,6 +98,7 @@
|
||||
const swipe = directions => {
|
||||
swiped = true
|
||||
|
||||
// Detect swipe direction
|
||||
if (directions.right) {
|
||||
goToPhoto('prev')
|
||||
} else if (directions.left) {
|
||||
@@ -159,7 +162,7 @@
|
||||
<source media="(min-width: 800px)" data-srcset={getThumbnail(image.private_hash, 900)}>
|
||||
<source media="(min-width: 500px)" data-srcset={getThumbnail(image.private_hash, 600)}>
|
||||
<source media="(min-width: 300px)" data-srcset={getThumbnail(image.private_hash, 400)}>
|
||||
<img src="data:image/png;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
|
||||
<img src={getThumbnail(image.private_hash, 900)}
|
||||
alt="{name}, {location.name}, {location.country.name}"
|
||||
width={defaultWidth} height={defaultHeight}
|
||||
class:lazyload={
|
||||
|
||||
Reference in New Issue
Block a user