Changeset - 2792019caf67
[Not reviewed]
beta
0 1 0
Leonardo - 13 years ago 2013-03-07 14:38:40
leo@unity3d.com
Fixing graphs for IE9 and probably above.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/public/js/graph.js
Show inline comments
 
@@ -17,25 +17,25 @@ var colors = [
 
	[ 0.0, 1.0, 0.0 ],
 
	[ 0.0, 1.0, 1.0 ],
 
	[ 0.0, 0.0, 1.0 ],
 
	[ 1.0, 0.0, 1.0 ],
 
	[ 1.0, 1.0, 0.0 ],
 
	[ 0.0, 0.0, 0.0 ]
 
];
 

	
 
function BranchRenderer() {
 
	
 
	this.canvas = document.getElementById("graph_canvas");
 
	
 
	if (navigator.userAgent.indexOf('MSIE') >= 0) 
 
	if (!document.createElement("canvas").getContext) 
 
		this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
 
	this.ctx = this.canvas.getContext('2d');
 
	this.ctx.strokeStyle = 'rgb(0, 0, 0)';
 
	this.ctx.fillStyle = 'rgb(0, 0, 0)';
 
	this.cur = [0, 0];
 
	this.line_width = 2.0;
 
	this.dot_radius = 3.5;
 
	
 
	this.setColor = function(color, bg, fg) {
 
		color %= colors.length;
 
		var red = (colors[color][0] * fg) || bg;
 
		var green = (colors[color][1] * fg) || bg;
0 comments (0 inline, 0 general)