Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

145
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda