Skip to content

Commit

Permalink
Fixed dragging scrolls the page beyond the boundary
Browse files Browse the repository at this point in the history
This fixes #92
  • Loading branch information
mariusGundersen authored Jan 13, 2025
1 parent 07edc6d commit 54bee91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ts/drag-drop-touch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,9 @@ class DragDropTouch {
_moveImage(e: TouchEvent) {
requestAnimationFrame(() => {
if (this._img) {
let pt = pointFrom(e, true),
let pt = pointFrom(e, false),
s = this._img.style;
s.position = `absolute`;
s.position = `fixed`;
s.pointerEvents = `none`;
s.zIndex = `999999`;
s.left = `${round(pt.x - this._imgOffset.x)}px`;
Expand Down

0 comments on commit 54bee91

Please sign in to comment.