UNPKG

motion-plus-vue

Version:

Motion Plus Vue

23 lines (22 loc) 438 B
import { ref as a, watch as p } from "vue"; import { pipe as s } from "motion-v"; function c({ x: o, y: r }, i) { const e = a(o.prev !== void 0 || r.prev !== void 0); return p(e, () => { if (e.value) return; const t = () => { e.value = !0, i(), n(); }, n = s( o.on("change", t), r.on("change", t) ); return () => n(); }, { immediate: !0 }), e; } export { c as useHasPointerMoved };