Commit a19e3d898d6bb52867f1356f3410f52fa0d76e98
1 parent
916c61fc
Exists in
master
and in
4 other branches
Display icon and commit message on network graph.
Showing
1 changed file
with
10 additions
and
1 deletions
Show diff stats
app/assets/javascripts/branch-graph.js.coffee
@@ -7,7 +7,7 @@ class BranchGraph | @@ -7,7 +7,7 @@ class BranchGraph | ||
7 | @colors = ["#000"] | 7 | @colors = ["#000"] |
8 | @offsetX = 120 | 8 | @offsetX = 120 |
9 | @offsetY = 20 | 9 | @offsetY = 20 |
10 | - @unitTime = 20 | 10 | + @unitTime = 30 |
11 | @unitSpace = 10 | 11 | @unitSpace = 10 |
12 | @load() | 12 | @load() |
13 | 13 | ||
@@ -179,6 +179,15 @@ class BranchGraph | @@ -179,6 +179,15 @@ class BranchGraph | ||
179 | fill: @colors[commit.space] | 179 | fill: @colors[commit.space] |
180 | stroke: "none" | 180 | stroke: "none" |
181 | ) | 181 | ) |
182 | + r.rect(@offsetX + @unitSpace * @mspace + 10, y - 10, 20, 20).attr( | ||
183 | + fill: "url(#{commit.author.icon})" | ||
184 | + stroke: @colors[commit.space] | ||
185 | + "stroke-width": 2 | ||
186 | + ) | ||
187 | + r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr( | ||
188 | + "text-anchor": "start" | ||
189 | + font: "14px Monaco, monospace" | ||
190 | + ) | ||
182 | 191 | ||
183 | drawLines: (x, y, commit) -> | 192 | drawLines: (x, y, commit) -> |
184 | r = @r | 193 | r = @r |