summaryrefslogtreecommitdiffstats
path: root/src/path.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-27 13:40:58 +0100
committerwout <wout@impinc.co.uk>2012-12-27 13:40:58 +0100
commit819c6e5e8d5c0484364e3b937130851471d38965 (patch)
tree9119980b05a8681ae7c90525cc5b409bd54dcd94 /src/path.js
parentf301d239c399ee4ee9c5656c5565ee2208294b14 (diff)
downloadsvg.js-819c6e5e8d5c0484364e3b937130851471d38965.tar.gz
svg.js-819c6e5e8d5c0484364e3b937130851471d38965.zip
Reworked transform()
Diffstat (limited to 'src/path.js')
-rw-r--r--src/path.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.js b/src/path.js
index 4faf174..27c28b3 100644
--- a/src/path.js
+++ b/src/path.js
@@ -11,12 +11,12 @@ SVG.extend(SVG.Path, {
// set path data
plot: function(d) {
- return this.attr('d', d);
+ return this.attr('d', d || 'M0,0L0,0');
},
// move path using translate
move: function(x, y) {
- return this.transform('translate(' + x + ',' + y + ')');
+ return this.transform({ x: x, y: y });
}
}); \ No newline at end of file