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

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

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