aboutsummaryrefslogtreecommitdiffstats
path: root/src/path.js
blob: 4f538925f8320b614ae2b581c5dd41effe7fd2dd (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() {
  this.constructor.call(this, SVG.create('path'))
}

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

SVG.extend(SVG.Path, {
  // Move over x-axis
  x: function(x) {
    return this.transform('x', x)
  }
  // Move over y-axis
, y: function(y) {
    return this.transform('y', y)
  }
  // Set path data
, plot: function(data) {
    return this.attr('d', data || 'M0,0')
  }
  
})