Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
Get relative position within div with useGesture

I'm using the @use-gesture/react package to try to get the relative [x, y] position within a div. It gives me a bunch of stats, but I can't figure out which ones I'm supposed to use to calculate it...

I'll share a code sandbox so you can check it out yourself, but the basic rundown is I would like to have the [0, 0] coords set to the middle of the box. If the box is 200px x 200px, the top left corner should be [-100, -100], bottom left [-100, 100]... Hope that makes sense :)

Edit inspiring-poitras-qkcmnr

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!