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

146
Vistas
reactJs using both onMouseDown and onMouseMove to choose multiple elements while holding the mouse button down?

so basically I want the user to be able to kinda select multiple elements by just drawing over them instead of choosing each manually. what I tried to do was on each element I have this onMouseMove function, and inside that function I am using this:

document.body.onmousedown = function() {
  //Selecting the items here, only if the mouse is also down
}

but it doesnt seem to be working as on mousedown is only true the moment it is clicked. sorry if this has been answered before I tried searching I couldnt find it. Thank you all in advance.

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