diff options
Diffstat (limited to 'src/path.js')
-rw-r--r-- | src/path.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/path.js b/src/path.js index c064a91..ee4484f 100644 --- a/src/path.js +++ b/src/path.js @@ -1,13 +1,18 @@ SVG.Path = function Path() { - this.constructor.call(this, SVG.createElement('path')); + this.constructor.call(this, SVG.create('path')); }; // inherit from SVG.Shape SVG.Path.prototype = new SVG.Shape(); -// set path data -SVG.Path.prototype.data = function(d) { - this.setAttribute('d', d); - return this; -};
\ No newline at end of file +// Add path-specific functions +SVG.Utils.merge(SVG.Path, { + + // set path data + data: function(d) { + this.attr('d', d); + return this; + } + +});
\ No newline at end of file |