rabbit: fix not clearing pointer start

This commit is contained in:
pythongosssss
2026-03-12 07:52:49 -07:00
parent 51ae7fe678
commit 34bc079ff6

View File

@@ -30,12 +30,18 @@ function onPointerDown(e: PointerEvent) {
}
function onIndicatorClick(e: MouseEvent) {
const start = pointerStart.value
if (start) {
const dx = e.clientX - start.x
const dy = e.clientY - start.y
if (dx * dx + dy * dy > 25) return
if (e.detail !== 0) {
const start = pointerStart.value
if (start) {
const dx = e.clientX - start.x
const dy = e.clientY - start.y
if (dx * dx + dy * dy > 25) {
pointerStart.value = null
return
}
}
}
pointerStart.value = null
dropIndicator?.onClick?.(e)
}