OSDN Git Service

Fix for #5767
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Mon, 13 Jan 2014 21:21:25 +0000 (22:21 +0100)
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>
Mon, 13 Jan 2014 21:22:46 +0000 (22:22 +0100)
In the branch graph, uploaded images where not rendered
correctly. Fixed this by not filling the rect, instead
i've put an image over it

app/assets/javascripts/branch-graph.js.coffee

index 3185385..dd09ee5 100644 (file)
@@ -194,11 +194,14 @@ class BranchGraph
       fill: @colors[commit.space]
       stroke: "none"
     )
-    r.rect(@offsetX + @unitSpace * @mspace + 10, y - 10, 20, 20).attr(
-      fill: "url(#{commit.author.icon})"
+
+    avatar_box_x = @offsetX + @unitSpace * @mspace + 10
+    avatar_box_y = y - 10
+    r.rect(avatar_box_x, avatar_box_y, 20, 20).attr(
       stroke: @colors[commit.space]
       "stroke-width": 2
     )
+    r.image(commit.author.icon, avatar_box_x, avatar_box_y, 20, 20)
     r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr(
       "text-anchor": "start"
       font: "14px Monaco, monospace"