diff --git a/frontend/src/components/files/ExtendedImage.vue b/frontend/src/components/files/ExtendedImage.vue index 4cfe247e..0270c49b 100644 --- a/frontend/src/components/files/ExtendedImage.vue +++ b/frontend/src/components/files/ExtendedImage.vue @@ -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()