• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

clippingkk / web / #1022

10 Jan 2025 05:30PM UTC coverage: 0.769% (+0.004%) from 0.765%
#1022

push

AnnatarHe
fix(lint): fix lint issue

31 of 355 branches covered (8.73%)

Branch coverage included in aggregate %.

11 of 1012 new or added lines in 117 files covered. (1.09%)

5 existing lines in 5 files now uncovered.

156 of 23962 relevant lines covered (0.65%)

12.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/hooks/pointer.ts
NEW
1
import { useEffect } from 'react'
×
2

×
3
function syncPointer({ x, y }: PointerEvent) {
×
4
  document.documentElement.style.setProperty('--pointer-x', x.toFixed(2))
×
5
  document.documentElement.style.setProperty(
×
6
    '--pointer-xp',
×
7
    (x / window.innerWidth).toFixed(2)
×
8
  )
×
9
  document.documentElement.style.setProperty('--pointer-y', y.toFixed(2))
×
10
  document.documentElement.style.setProperty(
×
11
    '--pointer-yp',
×
12
    (y / window.innerHeight).toFixed(2)
×
13
  )
×
14
}
×
15

×
16
// https://codepen.io/jh3y/pen/oNVvQRo
×
17
export function usePointerUpdate() {
×
18
  useEffect(() => {
×
19
    // if (isTouchDevice()) {
×
20
    //   return
×
21
    // }
×
22
    document.body.addEventListener('pointermove', syncPointer)
×
23
    return () => {
×
24
      document.body.removeEventListener('pointermove', syncPointer)
×
25
    }
×
26
  }, [])
×
27
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc