Change graph element size.

This commit is contained in:
Sato Hiroyuki 2013-03-19 19:27:15 +09:00
parent 351c952192
commit 175e09f167
2 changed files with 5 additions and 5 deletions

View file

@ -47,14 +47,14 @@ class BranchGraph
buildGraph: -> buildGraph: ->
graphWidth = $(@element).width() graphWidth = $(@element).width()
ch = @mspace * 20 + 100 ch = @mspace * 10 + 100
cw = Math.max(graphWidth, @mtime * 20 + 260) cw = Math.max(graphWidth, @mtime * 20 + 260)
r = Raphael(@element.get(0), cw, ch) r = Raphael(@element.get(0), cw, ch)
top = r.set() top = r.set()
cuday = 0 cuday = 0
cumonth = "" cumonth = ""
@offsetX = 20 @offsetX = 20
@offsetY = 60 @offsetY = 50
barWidth = Math.max(graphWidth, @days.length * 20 + 320) barWidth = Math.max(graphWidth, @days.length * 20 + 320)
@scrollLeft = cw @scrollLeft = cw
@raphael = r @raphael = r
@ -64,7 +64,7 @@ class BranchGraph
for day, mm in @days for day, mm in @days
if cuday isnt day[0] if cuday isnt day[0]
# Dates # Dates
r.text(@offsetX + mm * 20, 31, day[0]) r.text(@offsetX + mm * 20, 30, day[0])
.attr( .attr(
font: "12px Monaco, monospace" font: "12px Monaco, monospace"
fill: "#DDD" fill: "#DDD"
@ -73,7 +73,7 @@ class BranchGraph
if cumonth isnt day[1] if cumonth isnt day[1]
# Months # Months
r.text(@offsetX + mm * 20, 11, day[1]) r.text(@offsetX + mm * 20, 10, day[1])
.attr( .attr(
font: "12px Monaco, monospace" font: "12px Monaco, monospace"
fill: "#EEE" fill: "#EEE"

View file

@ -12,7 +12,7 @@
.graph { .graph {
background: #f1f1f1; background: #f1f1f1;
cursor: move; cursor: move;
height: 70%; height: 500px;
overflow: hidden; overflow: hidden;
} }
} }