Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

230
Vistas
x and y coordinates of a pinch-zoomed section of a page

Let's say we have a page with a div at the center which can be dragged and moved anywhere by the user. I can get the position of this rectangle using getBoundingClientRect. Everything is fine.

enter image description here

But now when I pinch-zoom (not ctrl + +) into the page and scroll to a section, I was expecting the getBoundingClientRect values to change but they don't, and that is understandable, as the values of window.scrollX and window.scrollY also remain the same, which is 0 in this case.

But the thing is, how can I calculate the x and y coordinates of the pinch-zoomed section of the page which is currently visible with respect to the origin of the page.

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda