Show More
@@ -42,13 +42,13 b' function Graph() {' | |||||
42 | this.columns = 0; |
|
42 | this.columns = 0; | |
43 | document.getElementById('nodebgs').innerHTML = ''; |
|
43 | document.getElementById('nodebgs').innerHTML = ''; | |
44 | document.getElementById('graphnodes').innerHTML = ''; |
|
44 | document.getElementById('graphnodes').innerHTML = ''; | |
45 | } |
|
45 | }; | |
46 |
|
46 | |||
47 | this.scale = function(height) { |
|
47 | this.scale = function(height) { | |
48 | this.bg_height = height; |
|
48 | this.bg_height = height; | |
49 | this.box_size = Math.floor(this.bg_height / 1.2); |
|
49 | this.box_size = Math.floor(this.bg_height / 1.2); | |
50 | this.cell_height = this.box_size; |
|
50 | this.cell_height = this.box_size; | |
51 | } |
|
51 | }; | |
52 |
|
52 | |||
53 | this.setColor = function(color, bg, fg) { |
|
53 | this.setColor = function(color, bg, fg) { | |
54 |
|
54 | |||
@@ -78,7 +78,7 b' function Graph() {' | |||||
78 | this.ctx.fillStyle = s; |
|
78 | this.ctx.fillStyle = s; | |
79 | return s; |
|
79 | return s; | |
80 |
|
80 | |||
81 | } |
|
81 | }; | |
82 |
|
82 | |||
83 | this.edge = function(x0, y0, x1, y1, color, width) { |
|
83 | this.edge = function(x0, y0, x1, y1, color, width) { | |
84 |
|
84 | |||
@@ -90,7 +90,7 b' function Graph() {' | |||||
90 | this.ctx.lineTo(x1, y1); |
|
90 | this.ctx.lineTo(x1, y1); | |
91 | this.ctx.stroke(); |
|
91 | this.ctx.stroke(); | |
92 |
|
92 | |||
93 | } |
|
93 | }; | |
94 |
|
94 | |||
95 | this.render = function(data) { |
|
95 | this.render = function(data) { | |
96 |
|
96 | |||
@@ -127,7 +127,7 b' function Graph() {' | |||||
127 | } |
|
127 | } | |
128 |
|
128 | |||
129 | if (start == this.columns && start > end) { |
|
129 | if (start == this.columns && start > end) { | |
130 |
|
|
130 | fold = true; | |
131 | } |
|
131 | } | |
132 |
|
132 | |||
133 | x0 = this.cell[0] + this.box_size * start + this.box_size / 2; |
|
133 | x0 = this.cell[0] + this.box_size * start + this.box_size / 2; | |
@@ -142,8 +142,8 b' function Graph() {' | |||||
142 |
|
142 | |||
143 | // Draw the revision node in the right column |
|
143 | // Draw the revision node in the right column | |
144 |
|
144 | |||
145 | column = node[0] |
|
145 | column = node[0]; | |
146 | color = node[1] |
|
146 | color = node[1]; | |
147 |
|
147 | |||
148 | radius = this.box_size / 8; |
|
148 | radius = this.box_size / 8; | |
149 | x = this.cell[0] + this.box_size * column + this.box_size / 2; |
|
149 | x = this.cell[0] + this.box_size * column + this.box_size / 2; | |
@@ -159,7 +159,7 b' function Graph() {' | |||||
159 | document.getElementById('nodebgs').innerHTML += backgrounds; |
|
159 | document.getElementById('nodebgs').innerHTML += backgrounds; | |
160 | document.getElementById('graphnodes').innerHTML += nodedata; |
|
160 | document.getElementById('graphnodes').innerHTML += nodedata; | |
161 |
|
161 | |||
162 | } |
|
162 | }; | |
163 |
|
163 | |||
164 | } |
|
164 | } | |
165 |
|
165 | |||
@@ -228,7 +228,7 b' function process_dates(parentSelector){' | |||||
228 | return shortdate(once); |
|
228 | return shortdate(once); | |
229 | } |
|
229 | } | |
230 |
|
230 | |||
231 | for (unit in scales){ |
|
231 | for (var unit in scales){ | |
232 | var s = scales[unit]; |
|
232 | var s = scales[unit]; | |
233 | var n = Math.floor(delta / s); |
|
233 | var n = Math.floor(delta / s); | |
234 | if ((n >= 2) || (s == 1)){ |
|
234 | if ((n >= 2) || (s == 1)){ | |
@@ -273,7 +273,8 b' function toggleLinewrap() {' | |||||
273 |
|
273 | |||
274 | function setLinewrap(enable) { |
|
274 | function setLinewrap(enable) { | |
275 | var nodes = document.getElementsByClassName('sourcelines'); |
|
275 | var nodes = document.getElementsByClassName('sourcelines'); | |
276 | for (var i = 0; i < nodes.length; i++) { |
|
276 | var i; | |
|
277 | for (i = 0; i < nodes.length; i++) { | |||
277 | if (enable) { |
|
278 | if (enable) { | |
278 | nodes[i].classList.add('wrap'); |
|
279 | nodes[i].classList.add('wrap'); | |
279 | } else { |
|
280 | } else { | |
@@ -282,7 +283,7 b' function toggleLinewrap() {' | |||||
282 | } |
|
283 | } | |
283 |
|
284 | |||
284 | var links = document.getElementsByClassName('linewraplink'); |
|
285 | var links = document.getElementsByClassName('linewraplink'); | |
285 |
for ( |
|
286 | for (i = 0; i < links.length; i++) { | |
286 | links[i].innerHTML = enable ? 'on' : 'off'; |
|
287 | links[i].innerHTML = enable ? 'on' : 'off'; | |
287 | } |
|
288 | } | |
288 | } |
|
289 | } | |
@@ -354,8 +355,7 b' function ajaxScrollInit(urlFormat,' | |||||
354 |
|
355 | |||
355 | var scrollHeight = document.documentElement.scrollHeight; |
|
356 | var scrollHeight = document.documentElement.scrollHeight; | |
356 | var clientHeight = document.documentElement.clientHeight; |
|
357 | var clientHeight = document.documentElement.clientHeight; | |
357 | var scrollTop = document.body.scrollTop |
|
358 | var scrollTop = document.body.scrollTop || document.documentElement.scrollTop; | |
358 | || document.documentElement.scrollTop; |
|
|||
359 |
|
359 | |||
360 | if (scrollHeight - (scrollTop + clientHeight) < 50) { |
|
360 | if (scrollHeight - (scrollTop + clientHeight) < 50) { | |
361 | updateInitiated = true; |
|
361 | updateInitiated = true; |
General Comments 0
You need to be logged in to leave comments.
Login now