1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
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 data: function(d) { return this.attr('d', d); } });