Block swipe while opening

This commit is contained in:
Dan Abramov
2024-11-07 11:25:55 +00:00
parent 4487136d58
commit a502001612
+2 -2
View File
@@ -421,14 +421,14 @@ function LightboxImage({
.maxPointers(1)
.onUpdate(e => {
'worklet'
if (isFlyingAway.value) {
if (openProgress.value !== 1 || isFlyingAway.value) {
return
}
dismissSwipeTranslateY.value = e.translationY
})
.onEnd(e => {
'worklet'
if (isFlyingAway.value) {
if (isFlyingAway.value || isFlyingAway.value) {
return
}
if (Math.abs(e.velocityY) > 1000) {