diff options
author | wout <wout@impinc.co.uk> | 2013-01-04 19:12:16 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-01-04 19:12:16 +0100 |
commit | 2380c67d4ddded556617760b4b3cb38a1d7758e2 (patch) | |
tree | c0bd5ee57a4c83e5d8860becba7766188344eda3 /src/path.js | |
parent | 40de19951d0a4218ee2625fa9a1a69f04e79692d (diff) | |
download | svg.js-2380c67d4ddded556617760b4b3cb38a1d7758e2.tar.gz svg.js-2380c67d4ddded556617760b4b3cb38a1d7758e2.zip |
Made code more readable and included docs
Diffstat (limited to 'src/path.js')
-rw-r--r-- | src/path.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/path.js b/src/path.js index 6a6ee49..5d7a3a5 100644 --- a/src/path.js +++ b/src/path.js @@ -1,22 +1,23 @@ - SVG.Path = function Path() { this.constructor.call(this, SVG.create('path')); }; -// inherit from SVG.Shape +// Inherit from SVG.Shape SVG.Path.prototype = new SVG.Shape(); -// Add path-specific functions SVG.extend(SVG.Path, { - // move using transform + /* move using transform */ move: function(x, y) { - this.transform({ x: x, y: y }); + this.transform({ + x: x, + y: y + }); }, - // set path data - plot: function(d) { - return this.attr('d', d || 'M0,0'); + /* set path data */ + plot: function(data) { + return this.attr('d', data || 'M0,0'); } });
\ No newline at end of file |