feat(core): support touch for connection creation

This commit is contained in:
braks
2022-11-17 20:05:02 +01:00
committed by Braks
parent 686b351569
commit b3fdbd884a
4 changed files with 125 additions and 8 deletions
@@ -15,7 +15,7 @@ const handle = ref<HTMLDivElement>()
const handleId = $computed(() => id ?? `${nodeId}__handle-${position}`)
const { onMouseDown, onClick } = useHandle({
const { onMouseDown, onTouchStart, onClick } = useHandle({
nodeId,
handleId,
isValidConnection,
@@ -94,6 +94,7 @@ export default {
},
]"
@mousedown="onMouseDown"
@touchstart="onTouchStart"
@click="onClick"
>
<slot :id="id" />