Commit c8968260 authored by Valery Sizov's avatar Valery Sizov

Graph: is done. v1

parent 94690bd2
...@@ -473,8 +473,5 @@ body.project-page table .commit { ...@@ -473,8 +473,5 @@ body.project-page table .commit {
border: solid 1px #999; border: solid 1px #999;
cursor: move; cursor: move;
height: 70%; height: 70%;
overflow: scroll; overflow: hidden;
position: absolute;
width: auto;
margin: 6ex 3ex 0ex 0ex;
} }
...@@ -37,16 +37,17 @@ function branchGraph(holder) { ...@@ -37,16 +37,17 @@ function branchGraph(holder) {
r = Raphael("holder", cw, ch), r = Raphael("holder", cw, ch),
top = r.set(); top = r.set();
var cuday = 0, cumonth = ""; var cuday = 0, cumonth = "";
r.rect(0,0,days.length*20+20,40).attr({fill: "#999"}); r.rect(0, 0, days.length * 20 + 20, 20).attr({fill: "#474D57"});
r.rect(0, 20, days.length * 20 + 20, 20).attr({fill: "#f7f7f7"});
for (mm = 0; mm < days.length; mm++) { for (mm = 0; mm < days.length; mm++) {
if(days[mm] != null){ if(days[mm] != null){
if(cuday != days[mm][0]){ if(cuday != days[mm][0]){
r.text(10+mm*20,30,days[mm][0]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"}); r.text(10 + mm * 20, 30, days[mm][0]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"});
cuday = days[mm][0] cuday = days[mm][0]
} }
if(cumonth != days[mm][1]){ if(cumonth != days[mm][1]){
r.text(10+mm*20,10,days[mm][1]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"}); r.text(10 + mm * 20, 10, days[mm][1]).attr({font: "12px Fontin-Sans, Arial", fill: "#444"});
cumonth = days[mm][1] cumonth = days[mm][1]
} }
...@@ -62,7 +63,7 @@ function branchGraph(holder) { ...@@ -62,7 +63,7 @@ function branchGraph(holder) {
if (shortrefs.length > 15){ if (shortrefs.length > 15){
shortrefs = shortrefs.substr(0,13) + "..."; shortrefs = shortrefs.substr(0,13) + "...";
} }
var t = r.text(x+5,y+5,shortrefs).attr({font: "12px Fontin-Sans, Arial", fill: "#666", var t = r.text(x+5, y+5, shortrefs).attr({font: "12px Fontin-Sans, Arial", fill: "#666",
title: longrefs, cursor: "pointer", rotation: "90"}); title: longrefs, cursor: "pointer", rotation: "90"});
var textbox = t.getBBox(); var textbox = t.getBBox();
......
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