Skip to content

Commit

Permalink
chore(useDraggable): fix a typo (vitest-dev#930)
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Nov 17, 2021
1 parent 50a8280 commit 438be0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/useDraggable/index.ts
Expand Up @@ -82,10 +82,10 @@ export function useDraggable(target: MaybeRef<HTMLElement | SVGElement | null>,
return
if (unref(options.exact) && e.target !== unref(target))
return
const react = unref(target)!.getBoundingClientRect()
const rect = unref(target)!.getBoundingClientRect()
const pos = {
x: e.pageX - react.left,
y: e.pageY - react.top,
x: e.pageX - rect.left,
y: e.pageY - rect.top,
}
if (options.onStart?.(pos, e) === false)
return
Expand Down

0 comments on commit 438be0c

Please sign in to comment.