8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b17010f commit 6b6701cCopy full SHA for 6b6701c
packages/core/useDraggable/component.ts
@@ -31,6 +31,9 @@ export const UseDraggable = /*#__PURE__*/ defineComponent<UseDraggableProps>({
31
'as',
32
'handle',
33
'axis',
34
+ 'onStart',
35
+ 'onMove',
36
+ 'onEnd',
37
] as unknown as undefined,
38
setup(props, { slots }) {
39
const target = ref()
@@ -45,7 +48,8 @@ export const UseDraggable = /*#__PURE__*/ defineComponent<UseDraggableProps>({
45
48
: undefined,
46
49
)
47
50
const initialValue = storageValue || props.initialValue || { x: 0, y: 0 }
- const onEnd = (position: Position) => {
51
+ const onEnd = (position: Position, event: PointerEvent) => {
52
+ props.onEnd?.(position, event)
53
if (!storageValue)
54
return
55
storageValue.value.x = position.x
0 commit comments