Commit a19e3d89 authored by Sato Hiroyuki's avatar Sato Hiroyuki

Display icon and commit message on network graph.

parent 916c61fc
...@@ -7,7 +7,7 @@ class BranchGraph ...@@ -7,7 +7,7 @@ class BranchGraph
@colors = ["#000"] @colors = ["#000"]
@offsetX = 120 @offsetX = 120
@offsetY = 20 @offsetY = 20
@unitTime = 20 @unitTime = 30
@unitSpace = 10 @unitSpace = 10
@load() @load()
...@@ -179,6 +179,15 @@ class BranchGraph ...@@ -179,6 +179,15 @@ class BranchGraph
fill: @colors[commit.space] fill: @colors[commit.space]
stroke: "none" stroke: "none"
) )
r.rect(@offsetX + @unitSpace * @mspace + 10, y - 10, 20, 20).attr(
fill: "url(#{commit.author.icon})"
stroke: @colors[commit.space]
"stroke-width": 2
)
r.text(@offsetX + @unitSpace * @mspace + 35, y, commit.message.split("\n")[0]).attr(
"text-anchor": "start"
font: "14px Monaco, monospace"
)
drawLines: (x, y, commit) -> drawLines: (x, y, commit) ->
r = @r r = @r
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment