Changeset - 42d1e1ab41a8
[Not reviewed]
default
0 2 0
Mads Kiilerich - 9 years ago 2016-06-29 16:52:07
madski@unity3d.com
js: clean-up of trailing whitespace in graph.js
2 files changed with 9 insertions and 8 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/graph.js
Show inline comments
 
@@ -25,13 +25,13 @@ var colors = [
 
function BranchRenderer(canvas_id, content_id, row_id_prefix) {
 
	// canvas_id is canvas to render into
 
	// content_id's height is applied to canvas
 
	// row_id_prefix is prefix that is applied to get row id's
 
	this.canvas = document.getElementById(canvas_id);
 
	var content = document.getElementById(content_id);
 
	
 

	
 
	if (!document.createElement("canvas").getContext)
 
		this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
 
	if (!this.canvas) { // canvas creation did for some reason fail - fail silently
 
		this.render = function(data,canvasWidth) {};
 
		return;
 
	}
 
@@ -97,13 +97,13 @@ function BranchRenderer(canvas_id, conte
 
			if (row == null) {
 
				console.log("error: row "+row_id_prefix+idx+" not found");
 
				continue;
 
			}
 
			var next = document.getElementById(row_id_prefix+(idx+1));
 
			var extra = 0;
 
			
 

	
 
			cur = data[i];
 
			node = cur[0];
 
			in_l = cur[1];
 
			closing = cur[2];
 
			obsolete_node = cur[3];
 

	
 
@@ -113,13 +113,13 @@ function BranchRenderer(canvas_id, conte
 
			for (var j in in_l) {
 
				line = in_l[j];
 
				start = line[0];
 
				end = line[1];
 
				color = line[2];
 
				obsolete_line = line[3];
 
				
 

	
 
				x = Math.floor(base_x - box_size * start);
 

	
 
				// figure out if this is a dead-end;
 
				// we want to fade away this line
 
				var dead_end = true;
 
				if (next != null) {
 
@@ -154,13 +154,13 @@ function BranchRenderer(canvas_id, conte
 
					this.ctx.fillStyle = gradient;
 
				}
 
				else
 
				{
 
					this.setColor(color, 0.0, 0.65);
 
				}
 
				
 

	
 
				this.ctx.lineWidth=this.line_width;
 
				this.ctx.beginPath();
 
				if (obsolete_line)
 
				{
 
					this.ctx.setLineDash([5]);
 
				}
 
@@ -180,18 +180,18 @@ function BranchRenderer(canvas_id, conte
 
					}
 
					this.ctx.bezierCurveTo (x,ymid,x2,ymid,x2,nextY);
 
				}
 
				this.ctx.stroke();
 
				this.ctx.setLineDash([]); // reset the dashed line, if any
 
			}
 
			
 

	
 
			column = node[0];
 
			color = node[1];
 
			
 

	
 
			x = Math.floor(base_x - box_size * column);
 
		
 

	
 
			this.setColor(color, 0.25, 0.75);
 

	
 

	
 
			r = this.dot_radius
 
			if (obsolete_node)
 
			{
 
@@ -213,10 +213,10 @@ function BranchRenderer(canvas_id, conte
 
				this.ctx.arc(x, rowY, r, 0, Math.PI * 2, true);
 
				this.ctx.fill();
 
			}
 

	
 
			idx++;
 
		}
 
				
 

	
 
	}
 

	
 
}
scripts/whitespacecleanup.sh
Show inline comments
 
@@ -15,11 +15,12 @@ sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2
 

	
 
sed -i -e 's/^\(    [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e '1s|, |,|g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's/^\([^ ,/].*\)   */\1 /g' kallithea/public/css/{style,contextbar}.css
 
sed -i -e 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt
 
sed -i -e 's,[ 	][ 	]*$,,g' -e 's, 	,	,g' kallithea/public/js/graph.js
 

	
 
hg mani | xargs chmod -x
 
hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x
 

	
 
hg diff
0 comments (0 inline, 0 general)