fix(core): emit node click if drag was aborted (#1525)

* fix(core): emit node click if drag was aborted

* chore(changeset): add

* chore(core): cleanup
This commit is contained in:
Braks
2024-07-09 00:42:51 +02:00
parent 0a0dfe96f1
commit 9d14595f1d
3 changed files with 28 additions and 14 deletions
@@ -120,14 +120,17 @@ const NodeWrapper = defineComponent({
disabled: () => !isDraggable.value,
selectable: isSelectable,
dragHandle: () => node.dragHandle,
onStart(args) {
emit.dragStart(args)
onStart(event) {
emit.dragStart(event)
},
onDrag(args) {
emit.drag(args)
onDrag(event) {
emit.drag(event)
},
onStop(args) {
emit.dragStop(args)
onStop(event) {
emit.dragStop(event)
},
onClick(event) {
emit.click({ node, event })
},
})