equal
deleted
inserted
replaced
93 this.render = function(data) { |
93 this.render = function(data) { |
94 |
94 |
95 var backgrounds = ''; |
95 var backgrounds = ''; |
96 var nodedata = ''; |
96 var nodedata = ''; |
97 |
97 |
98 for (var i in data) { |
98 for (var i = 0; i < data.length; i++) { |
99 |
99 |
100 var parity = i % 2; |
100 var parity = i % 2; |
101 this.cell[1] += this.bg_height; |
101 this.cell[1] += this.bg_height; |
102 this.bg[1] += this.bg_height; |
102 this.bg[1] += this.bg_height; |
103 |
103 |
105 var node = cur[1]; |
105 var node = cur[1]; |
106 var edges = cur[2]; |
106 var edges = cur[2]; |
107 var fold = false; |
107 var fold = false; |
108 |
108 |
109 var prevWidth = this.ctx.lineWidth; |
109 var prevWidth = this.ctx.lineWidth; |
110 for (var j in edges) { |
110 for (var j = 0; j < edges.length; j++) { |
111 |
111 |
112 line = edges[j]; |
112 line = edges[j]; |
113 start = line[0]; |
113 start = line[0]; |
114 end = line[1]; |
114 end = line[1]; |
115 color = line[2]; |
115 color = line[2]; |
225 if (delta > (2 * scales.year)){ |
225 if (delta > (2 * scales.year)){ |
226 return shortdate(once); |
226 return shortdate(once); |
227 } |
227 } |
228 |
228 |
229 for (var unit in scales){ |
229 for (var unit in scales){ |
|
230 if (!scales.hasOwnProperty(unit)) { continue; } |
230 var s = scales[unit]; |
231 var s = scales[unit]; |
231 var n = Math.floor(delta / s); |
232 var n = Math.floor(delta / s); |
232 if ((n >= 2) || (s === 1)){ |
233 if ((n >= 2) || (s === 1)){ |
233 if (future){ |
234 if (future){ |
234 return format(n, unit) + ' from now'; |
235 return format(n, unit) + ' from now'; |