       .style("visibility", (d) -> "hidden" if d.type == "project")
       .attr("id", (d) -> "task-" + d.taskId)
       .attr("transform", (d) ->
-          "translate(" + source.y0 + "," + source.x0 + ")"
+          if source.y0 == source.y
+            y = source.rightPoint()
+          else
+            y = source.y0
+          "translate(" + y + "," + source.x0 + ")"
         )
       .on("click", (d) ->
         toggle d

      .attr("d", (d) ->
        o =
          x: source.x0
          y: source.y0

        diagonal
          source: o

      .style("fill-opacity", 1)
    
    # Transition exiting nodes to the parent's new position.
    nodeExit = node.exit()
      .transition()
      .duration(duration)
      .attr("transform", (d) ->
        "translate(" + source.rightPoint() + "," + source.x + ")"
      )
      .remove()

    nodeExit.select("circle").attr "r", 1e-6
    nodeExit.select("text").style "fill-opacity", 1e-6
    
