Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 41c2a42

Browse files
fix: real size preview image drag offset
1 parent b64b3e2 commit 41c2a42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/components/MediaPreviewImage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function onMousemove (e: MouseEvent) {
3636
if (!e.screenX && !e.screenY) { return } // don't move if mouse is out of the screen
3737
if (!imageRef.value) { return }
3838
39-
offsetX.value = e.clientX - initialX.value - 128 // 128 = mx-32 (magin present on X axis on MediaPreview container)
40-
offsetY.value = e.clientY - initialY.value - 96 // 96 = my-24 (magin present on Y axis on on MediaPreview container)
39+
offsetX.value = e.clientX - initialX.value
40+
offsetY.value = e.clientY - initialY.value
4141
}
4242
4343
function onMouseup (e: MouseEvent) {

0 commit comments

Comments
 (0)