drag(simulation))

      // Hover to show popup
      g.on('mouseenter', (event, d) => {
        if (popup) {
          popup.labelHover = true
          clearTimeout(hoverTimeout)
          hoverTimeout = null
          if (popup.node !== d) { // Hover to another label while popup is shown, switch
            popup.node = d
            popup.srcElement = event.srcElement
            updatePopup()
          }
        } else if (hoverTimeout === null) {
          hoverTimeout = setTimeout(() => {
           