~ubuntu-branches/ubuntu/precise/whoopsie-daisy/precise-proposed

« back to all changes in this revision

Viewing changes to backend/stats/static/js/d3/src/svg/line-radial.js

  • Committer: Package Import Robot
  • Author(s): Evan Dandrea
  • Date: 2012-04-10 14:28:58 UTC
  • Revision ID: package-import@ubuntu.com-20120410142858-nk453o1z7t7py3bs
Tags: 0.1.26
* Take ownership of the NetworkManager state variant on setup and
  unref it, plugging a memory leak.
* Log the reason the server rejected the submitted crash report.
* Send the Whoopsie version with each crash submission.
* Delete both .upload and .uploaded files after 14 days. Thanks
  Marc Deslauriers (LP: #973687).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
d3.svg.line.radial = function() {
 
2
  var line = d3_svg_line(d3_svg_lineRadial);
 
3
  line.radius = line.x, delete line.x;
 
4
  line.angle = line.y, delete line.y;
 
5
  return line;
 
6
};
 
7
 
 
8
function d3_svg_lineRadial(points) {
 
9
  var point,
 
10
      i = -1,
 
11
      n = points.length,
 
12
      r,
 
13
      a;
 
14
  while (++i < n) {
 
15
    point = points[i];
 
16
    r = point[0];
 
17
    a = point[1] + d3_svg_arcOffset;
 
18
    point[0] = r * Math.cos(a);
 
19
    point[1] = r * Math.sin(a);
 
20
  }
 
21
  return points;
 
22
}