aboutsummaryrefslogtreecommitdiffstats
path: root/src/path.js
blob: fef580917c51a95722d9a01e56bd2b04a9e82aab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
SVG.Path = function Path() {
  this.constructor.call(this, SVG.create('path'));
};

// inherit from SVG.Shape
SVG.Path.prototype = new SVG.Shape();

// Add path-specific functions
SVG.extend(SVG.Path, {
  
  // set path data
  plot: function(d) {
    return this.attr('d', d || 'M0,0');
  },
  
  // move path using translate
  move: function(x, y) {
    return this.transform({ x: x, y: y });
  }
  
});