1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

fixed photoswipe click

This commit is contained in:
Fedor Katurov 2020-04-28 14:34:03 +07:00
parent 3301629920
commit d1dc914572

View file

@ -184,7 +184,10 @@ const NodeImageSlideBlock: FC<IProps> = ({
setIsDragging(false);
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();
}
},