Skip to content

Commit

Permalink
disable zooming for single shared file
Browse files Browse the repository at this point in the history
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
  • Loading branch information
vanpertsch committed May 23, 2022
1 parent d622004 commit 6043727
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/components/Images.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ export default {
this.disableSwipe()
this.shiftX = this.shiftX + Math.round(-scrollPercX * growX)
this.shiftY = this.shiftY + Math.round(-scrollPercY * growY)
this.zoomRatio = newZoomRatio
// only change zoomRatio when multiple files are in the fileList. Disable for single shared files
if (this.fileList.length > 1) {
this.zoomRatio = newZoomRatio
}
},
resetZoom() {
Expand Down

0 comments on commit 6043727

Please sign in to comment.