mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-29 14:47:21 +02:00
Fix:Epub ereader swiping moving 2 pages #802
This commit is contained in:
@@ -289,7 +289,6 @@ export default {
|
|||||||
const touchDistanceX = Math.abs(this.touchendX - this.touchstartX)
|
const touchDistanceX = Math.abs(this.touchendX - this.touchstartX)
|
||||||
const touchDistanceY = Math.abs(this.touchendY - this.touchstartY)
|
const touchDistanceY = Math.abs(this.touchendY - this.touchstartY)
|
||||||
const touchDistance = Math.sqrt(Math.pow(this.touchstartX - this.touchendX, 2) + Math.pow(this.touchstartY - this.touchendY, 2))
|
const touchDistance = Math.sqrt(Math.pow(this.touchstartX - this.touchendX, 2) + Math.pow(this.touchstartY - this.touchendY, 2))
|
||||||
console.log('[Reader] Touch distance=', touchDistance)
|
|
||||||
if (touchDistance < 30) {
|
if (touchDistance < 30) {
|
||||||
if (this.showSettingsModal) {
|
if (this.showSettingsModal) {
|
||||||
this.showSettingsModal = false
|
this.showSettingsModal = false
|
||||||
@@ -303,14 +302,6 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.hideToolbar()
|
this.hideToolbar()
|
||||||
if (this.touchendX < this.touchstartX) {
|
|
||||||
console.log('[Reader] Gesture next page')
|
|
||||||
this.next()
|
|
||||||
}
|
|
||||||
if (this.touchendX > this.touchstartX) {
|
|
||||||
console.log('[Reader] Gesture prev page')
|
|
||||||
this.prev()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
showToolbar() {
|
showToolbar() {
|
||||||
this.showingToolbar = true
|
this.showingToolbar = true
|
||||||
@@ -325,7 +316,6 @@ export default {
|
|||||||
else this.showToolbar()
|
else this.showToolbar()
|
||||||
},
|
},
|
||||||
touchstart(e) {
|
touchstart(e) {
|
||||||
console.log('[Reader] Touch start')
|
|
||||||
// Ignore rapid touch
|
// Ignore rapid touch
|
||||||
if (this.touchstartTime && Date.now() - this.touchstartTime < 250) {
|
if (this.touchstartTime && Date.now() - this.touchstartTime < 250) {
|
||||||
return
|
return
|
||||||
@@ -337,7 +327,6 @@ export default {
|
|||||||
this.touchIdentifier = e.touches[0].identifier
|
this.touchIdentifier = e.touches[0].identifier
|
||||||
},
|
},
|
||||||
touchend(e) {
|
touchend(e) {
|
||||||
console.log('[Reader] Touch end')
|
|
||||||
if (this.touchIdentifier !== e.changedTouches[0].identifier) {
|
if (this.touchIdentifier !== e.changedTouches[0].identifier) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user