Skip to content

Commit 7dbc84c

Browse files
committed
disable zooming for single shared file
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
1 parent d622004 commit 7dbc84c

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

js/viewer-main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer-main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Images.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ export default {
153153
this.disableSwipe()
154154
this.shiftX = this.shiftX + Math.round(-scrollPercX * growX)
155155
this.shiftY = this.shiftY + Math.round(-scrollPercY * growY)
156-
this.zoomRatio = newZoomRatio
156+
157+
// only change zoomRatio when multiple files are in the list. Disable for singleshared files
158+
if (this.fileList.length > 1) {
159+
this.zoomRatio = newZoomRatio
160+
window.console.log('test')
161+
}
157162
},
158163
159164
resetZoom() {

0 commit comments

Comments
 (0)