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

119
Visualizações
selection of node in a graph

I am developing force directed graph in JavaScript and WebGL. My concern is draggable feature like one in d3.js.

For that I want to first achieve the selection of node in the graph which I am not able to figure out how to select it.

My node and edge data are array of property of each node which is position x and y whereas edge array is array of target and destination node.

I want to implement the feature where I can drag the node in the graph with mouse pointer.

One naïve way of thinking is to listen to mouse click event and its mouse location. With that location, iterate over all the nodes location to find if any node is selected. I am pretty sure that would take lot of computation power and time. I don't know if there is any way to achieve this smartly even in this way of implementation.

I don't know if I am correct or not but since d3 use the circle element to represent the node and listen the mouse event in that event handling. Please correct me if I am wrong.

I will be grateful for any kind of feedback or suggestion or guidance. Thank you 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