diff options
author | wout <wout@impinc.co.uk> | 2013-03-12 13:31:09 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-03-12 13:31:09 +0100 |
commit | 4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b (patch) | |
tree | 0300a47ca1b263ae0cd0fdb5fe76218ceb9aa745 /src/path.js | |
parent | 6c6c82ed59533f44f8754b69d47e3b11cd6dd129 (diff) | |
download | svg.js-4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b.tar.gz svg.js-4bd21ec64a0e3c1d4d0acf5685b2230285c7c16b.zip |
Added x(), y(), cx(), cy() and matrix
Diffstat (limited to 'src/path.js')
-rw-r--r-- | src/path.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/path.js b/src/path.js index 2d3558f..4f53892 100644 --- a/src/path.js +++ b/src/path.js @@ -6,14 +6,14 @@ SVG.Path = function() { SVG.Path.prototype = new SVG.Shape() SVG.extend(SVG.Path, { - // Move using transform - move: function(x, y) { - this.transform({ - x: x, - y: y - }) + // 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') |