Skip to content

Commit

Permalink
fix: bounds causing inverted drag
Browse files Browse the repository at this point in the history
* fixes issue #108
  • Loading branch information
bcakmakoglu committed Oct 12, 2021
1 parent 16ed593 commit d7ee9f2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/hooks/useDraggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ const useDraggable = (target: MaybeRef<any>, options: Partial<DraggableOptions>)
if (get(state).bounds) {
const { x, y } = newState;

newState.x += get(state).slackX;
newState.y += get(state).slackY;

const [boundX, boundY] = getBoundPosition({
bounds: get(state).bounds,
x: newState.x,
Expand Down

0 comments on commit d7ee9f2

Please sign in to comment.