fix: double click to zoom pics in phone's browser (#1274)
fixed this : https://github.com/filebrowser/filebrowser/issues/1266pull/1288/head
parent
f3afd5cb79
commit
f1b7bd59f6
|
@ -138,6 +138,15 @@ export default {
|
|||
this.lastX = null
|
||||
this.lastY = null
|
||||
this.lastTouchDistance = null
|
||||
if (event.targetTouches.length < 2) {
|
||||
setTimeout(() => {
|
||||
this.touches = 0
|
||||
}, 300)
|
||||
this.touches++
|
||||
if (this.touches > 1) {
|
||||
this.zoomAuto(event)
|
||||
}
|
||||
}
|
||||
event.preventDefault()
|
||||
},
|
||||
zoomAuto(event) {
|
||||
|
@ -151,6 +160,7 @@ export default {
|
|||
default:
|
||||
case 4:
|
||||
this.scale = 1
|
||||
this.setCenter()
|
||||
break
|
||||
}
|
||||
this.setZoom()
|
||||
|
|
Loading…
Reference in New Issue