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

191
Vistas
popover click off to close (AND open another popover, if a different node is clicked)

See this codepen for a demo of the popovers when you click on a blue node.

I am trying to make the popover close functionality work like the following

  • If I click "off" (in some non-interactive space, the background page), close popover.
  • If I click another node when an existing popover is open, the existing popover will close and the new popover associated with the just-clicked node will open.

I've followed an implementation where an invisible "tooltip-overlay" appears, which supports the click-off to close functionality. But that won't let me click on other nodes without first hiding the overlay.

clicking a node fires clicknode function, which displays the "tooltip" and the "tooltipBg"

  function clicknode(event, nodes) {
  const[x, y] = d3.pointer(event);
  tooltipBg.style("display", "block");
  tooltip
    .style("left", `${event.pageX}px`)
    .style("top", `${event.pageY}px`)
    .transition().duration(1).style("visibility", "visible")
    .transition().duration(300).style("opacity", 1)
    .style("display", "block");
     loadTooltipContent(nodes);
}

Thanks for any help you might have.

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