0 && dy > Math.abs(dx)) {
_ds = true;
_dy = dy;
} else if (Math.abs(dx) > Math.abs(dy)) {
_ds = false;
_dy = 0;
}
"
@pointerup.stop="
if (_sx === null) return;
const dx = $event.clientX - _sx, dy = $event.clientY - _ssy, dt = Date.now() - _t;
_sx = null; _ssy = null; _t = null;
if (Math.abs(dx) < 8 && Math.abs(dy) < 8 && dt < 300) {
_ds = false; _dy = 0;
$store.catalog.currentImage && $store.catalog.openLightbox($store.catalog.currentImage);
return;
}
if (_ds && _dy > 50 && _dy >= Math.abs(dx)) {
$store.catalog.closeItem();
setTimeout(() => { _ds = false; _dy = 0; }, 250);
return;
}
if (Math.abs(dx) > Math.abs(dy) && Math.abs(dx) > 40) {
dx < 0 ? $store.catalog.nextImage() : $store.catalog.prevImage();
}
_ds = false; _dy = 0;
"
@pointercancel.stop="_ds = false; _dy = 0; _sx = null; _ssy = null; _t = null;">