comparison rhodecode/public/js/graph.js @ 3535:2792019caf67 beta

Fixing graphs for IE9 and probably above.
author Leonardo <leo@unity3d.com>
date Thu, 07 Mar 2013 14:38:40 +0100
parents bd97aba292f1
children 6e8027c2f49c
comparison
equal deleted inserted replaced
3534:0700ca7f6a67 3535:2792019caf67
24 24
25 function BranchRenderer() { 25 function BranchRenderer() {
26 26
27 this.canvas = document.getElementById("graph_canvas"); 27 this.canvas = document.getElementById("graph_canvas");
28 28
29 if (navigator.userAgent.indexOf('MSIE') >= 0) 29 if (!document.createElement("canvas").getContext)
30 this.canvas = window.G_vmlCanvasManager.initElement(this.canvas); 30 this.canvas = window.G_vmlCanvasManager.initElement(this.canvas);
31 this.ctx = this.canvas.getContext('2d'); 31 this.ctx = this.canvas.getContext('2d');
32 this.ctx.strokeStyle = 'rgb(0, 0, 0)'; 32 this.ctx.strokeStyle = 'rgb(0, 0, 0)';
33 this.ctx.fillStyle = 'rgb(0, 0, 0)'; 33 this.ctx.fillStyle = 'rgb(0, 0, 0)';
34 this.cur = [0, 0]; 34 this.cur = [0, 0];