Skip to content
Snippets Groups Projects
Unverified Commit 839627ff authored by tusooa's avatar tusooa :zap:
Browse files

Reset position on swipe end even if we cannot navigate

parent f3269cdc
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,6 @@ const MediaModal = {
this.loading = true
}
this.$store.dispatch('setCurrentMedia', newMedia)
this.$refs.pinchZoom.setTransform({ scale: 1, x: 0, y: 0 })
}
},
goNext () {
......@@ -92,7 +91,6 @@ const MediaModal = {
this.loading = true
}
this.$store.dispatch('setCurrentMedia', newMedia)
this.$refs.pinchZoom.setTransform({ scale: 1, x: 0, y: 0 })
}
},
onImageLoaded () {
......@@ -103,9 +101,8 @@ const MediaModal = {
},
handleSwipeEnd (sign) {
console.log('handleSwipeEnd:', sign)
if (sign === 0) {
this.$refs.pinchZoom.setTransform({ scale: 1, x: 0, y: 0 })
} else if (sign > 0) {
this.$refs.pinchZoom.setTransform({ scale: 1, x: 0, y: 0 })
if (sign > 0) {
this.goNext()
} else {
this.goPrev()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment