mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
fixed photoswipe click
This commit is contained in:
parent
3301629920
commit
d1dc914572
1 changed files with 4 additions and 1 deletions
|
@ -184,7 +184,10 @@ const NodeImageSlideBlock: FC<IProps> = ({
|
||||||
setIsDragging(false);
|
setIsDragging(false);
|
||||||
normalizeOffset();
|
normalizeOffset();
|
||||||
|
|
||||||
if (Math.abs(new Date().getTime() - drag_start) < 200 && initial_x - getX(event) < 20) {
|
if (
|
||||||
|
Math.abs(new Date().getTime() - drag_start) < 200 &&
|
||||||
|
Math.abs(initial_x - getX(event)) < 5
|
||||||
|
) {
|
||||||
onOpenPhotoSwipe();
|
onOpenPhotoSwipe();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue