Skip to content

Commit

Permalink
Merge pull request #1863 from nextcloud/fix/pan-zoomed-images
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Aug 15, 2023
2 parents a19ca96 + a33d766 commit 8f0c125
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: 3 additions & 3 deletions src/components/Images.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
}"
:src="data"
:style="{
marginTop: shiftY + 'px',
marginLeft: shiftX + 'px',
marginTop: (shiftY * 2) + 'px',
marginLeft: (shiftX * 2) + 'px',
maxHeight: zoomRatio * 100 + '%',
maxWidth: zoomRatio * 100 + '%',
}"
Expand Down Expand Up @@ -240,7 +240,7 @@ export default {
const growY = this.zoomHeight - this.height
this.shiftX = Math.min(Math.max(moveX, -growX / 2), growX / 2)
this.shiftY = Math.min(Math.max(moveY, -growY / 2), growX / 2)
this.shiftY = Math.min(Math.max(moveY, -growY / 2), growY / 2)
this.dragX = pageX
this.dragY = pageY
}
Expand Down

0 comments on commit 8f0c125

Please sign in to comment.