     )
     textbox = text.getBBox()
     # Create rectangle based on the size of the textbox
-    rect = r.rect(x, y - 7, textbox.width + 15, textbox.height + 5, 4).attr(
+    rect = r.rect(x, y - 7, textbox.width + 5, textbox.height + 5, 4).attr(
       fill: "#000"
       "fill-opacity": .5
       stroke: "none"

      # Circumvent if overlap
      if commit.space isnt parentCommit.space or commit.space isnt parent[1]
        route.push(
          "L", x + d2[0], y + d2[1],
          "L", parentX2, y + 10,
          "L", parentX2, parentY - 5,
        )

    shortrefs = refs
    # Truncate if longer than 15 chars
    shortrefs = shortrefs.substr(0, 15) + "…"  if shortrefs.length > 17
    text = r.text(x + 4, y, shortrefs).attr(
      "text-anchor": "start"
      font: "10px Monaco, monospace"
      fill: "#FFF"
