Show More
@@ -67,7 +67,7 b' function BranchRenderer() {' | |||
|
67 | 67 | for (var i in data) { |
|
68 | 68 | this.scale(scale); |
|
69 | 69 | var row = document.getElementById("chg_"+idx); |
|
70 | var next = document.getElementById("chg_"+idx+1); | |
|
70 | var next = document.getElementById("chg_"+(idx+1)); | |
|
71 | 71 | var extra = 0; |
|
72 | 72 | |
|
73 | 73 | //skip this since i don't have DATE in my app |
@@ -82,7 +82,10 b' function BranchRenderer() {' | |||
|
82 | 82 | nodeid = cur[0]; |
|
83 | 83 | node = cur[1]; |
|
84 | 84 | in_l = cur[2]; |
|
85 | ||
|
85 | ||
|
86 | var rowY = row.offsetTop + row.offsetHeight/2 - rela.offsetTop; | |
|
87 | var nextY = (next == null) ? rowY + row.offsetHeight/2 : next.offsetTop + next.offsetHeight/2 - rela.offsetTop; | |
|
88 | ||
|
86 | 89 | for (var j in in_l) { |
|
87 | 90 | |
|
88 | 91 | line = in_l[j]; |
@@ -100,26 +103,23 b' function BranchRenderer() {' | |||
|
100 | 103 | |
|
101 | 104 | this.setColor(color, 0.0, 0.65); |
|
102 | 105 | |
|
103 | y = row.offsetTop-rela.offsetTop+row.offsetHeight/2; | |
|
104 | 106 | x = pad-((this.cell[0] + this.box_size * start - 1) + this.bg_height-2); |
|
105 | 107 | |
|
106 | 108 | this.ctx.lineWidth=this.line_width; |
|
107 | 109 | this.ctx.beginPath(); |
|
108 |
this.ctx.moveTo(x, |
|
|
110 | this.ctx.moveTo(x, rowY); | |
|
109 | 111 | |
|
110 | 112 | |
|
111 | 113 | if (start == end) |
|
112 | 114 | { |
|
113 | 115 | x = pad-((1 + this.box_size * end) + this.bg_height-2); |
|
114 | y += row.offsetHeight; | |
|
115 | this.ctx.lineTo(x,y+extra,3); | |
|
116 | this.ctx.lineTo(x,nextY+extra,3); | |
|
116 | 117 | } |
|
117 | 118 | else |
|
118 | 119 | { |
|
119 | 120 | var x2 = pad-((1 + this.box_size * end) + this.bg_height-2); |
|
120 | var y2 = y + row.offsetHeight; | |
|
121 | var ymid = (y+y2) / 2; | |
|
122 | this.ctx.bezierCurveTo (x,ymid,x2,ymid,x2,y2); | |
|
121 | var ymid = (rowY+nextY) / 2; | |
|
122 | this.ctx.bezierCurveTo (x,ymid,x2,ymid,x2,nextY); | |
|
123 | 123 | } |
|
124 | 124 | this.ctx.stroke(); |
|
125 | 125 | } |
@@ -128,12 +128,11 b' function BranchRenderer() {' | |||
|
128 | 128 | color = node[1] |
|
129 | 129 | |
|
130 | 130 | radius = this.dot_radius; |
|
131 | y = row.offsetTop-rela.offsetTop+row.offsetHeight/2; | |
|
132 | 131 | x = pad-(Math.round(this.cell[0] * scale/2 * column + radius) + 15 - (column*4)); |
|
133 | 132 | |
|
134 | 133 | this.ctx.beginPath(); |
|
135 | 134 | this.setColor(color, 0.25, 0.75); |
|
136 |
this.ctx.arc(x, |
|
|
135 | this.ctx.arc(x, rowY, radius, 0, Math.PI * 2, true); | |
|
137 | 136 | this.ctx.fill(); |
|
138 | 137 | |
|
139 | 138 | idx++; |
General Comments 0
You need to be logged in to leave comments.
Login now