Commit 175e09f16742cbc8d5535e548cef880768ec3397

Authored by Sato Hiroyuki
1 parent 351c9521

Change graph element size.

app/assets/javascripts/branch-graph.js.coffee
@@ -47,14 +47,14 @@ class BranchGraph @@ -47,14 +47,14 @@ class BranchGraph
47 47
48 buildGraph: -> 48 buildGraph: ->
49 graphWidth = $(@element).width() 49 graphWidth = $(@element).width()
50 - ch = @mspace * 20 + 100 50 + ch = @mspace * 10 + 100
51 cw = Math.max(graphWidth, @mtime * 20 + 260) 51 cw = Math.max(graphWidth, @mtime * 20 + 260)
52 r = Raphael(@element.get(0), cw, ch) 52 r = Raphael(@element.get(0), cw, ch)
53 top = r.set() 53 top = r.set()
54 cuday = 0 54 cuday = 0
55 cumonth = "" 55 cumonth = ""
56 @offsetX = 20 56 @offsetX = 20
57 - @offsetY = 60 57 + @offsetY = 50
58 barWidth = Math.max(graphWidth, @days.length * 20 + 320) 58 barWidth = Math.max(graphWidth, @days.length * 20 + 320)
59 @scrollLeft = cw 59 @scrollLeft = cw
60 @raphael = r 60 @raphael = r
@@ -64,7 +64,7 @@ class BranchGraph @@ -64,7 +64,7 @@ class BranchGraph
64 for day, mm in @days 64 for day, mm in @days
65 if cuday isnt day[0] 65 if cuday isnt day[0]
66 # Dates 66 # Dates
67 - r.text(@offsetX + mm * 20, 31, day[0]) 67 + r.text(@offsetX + mm * 20, 30, day[0])
68 .attr( 68 .attr(
69 font: "12px Monaco, monospace" 69 font: "12px Monaco, monospace"
70 fill: "#DDD" 70 fill: "#DDD"
@@ -73,7 +73,7 @@ class BranchGraph @@ -73,7 +73,7 @@ class BranchGraph
73 73
74 if cumonth isnt day[1] 74 if cumonth isnt day[1]
75 # Months 75 # Months
76 - r.text(@offsetX + mm * 20, 11, day[1]) 76 + r.text(@offsetX + mm * 20, 10, day[1])
77 .attr( 77 .attr(
78 font: "12px Monaco, monospace" 78 font: "12px Monaco, monospace"
79 fill: "#EEE" 79 fill: "#EEE"
app/assets/stylesheets/sections/graph.scss
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 .graph { 12 .graph {
13 background: #f1f1f1; 13 background: #f1f1f1;
14 cursor: move; 14 cursor: move;
15 - height: 70%; 15 + height: 500px;
16 overflow: hidden; 16 overflow: hidden;
17 } 17 }
18 } 18 }