summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-26 12:48:46 +0100
committerwout <wout@impinc.co.uk>2012-12-26 12:48:46 +0100
commitf301d239c399ee4ee9c5656c5565ee2208294b14 (patch)
treea6e8e9520ab7693258034e6c692208ae41ca418a /src
parenta2f2323f3d03a0c79232647f9716bb9d5d4c9d54 (diff)
downloadsvg.js-f301d239c399ee4ee9c5656c5565ee2208294b14.tar.gz
svg.js-f301d239c399ee4ee9c5656c5565ee2208294b14.zip
Fix in path
Diffstat (limited to 'src')
-rw-r--r--src/path.js5
-rw-r--r--src/svg.js5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/path.js b/src/path.js
index 5c8ca46..4faf174 100644
--- a/src/path.js
+++ b/src/path.js
@@ -12,6 +12,11 @@ SVG.extend(SVG.Path, {
// set path data
plot: function(d) {
return this.attr('d', d);
+ },
+
+ // move path using translate
+ move: function(x, y) {
+ return this.transform('translate(' + x + ',' + y + ')');
}
}); \ No newline at end of file
diff --git a/src/svg.js b/src/svg.js
index 0096188..876b9aa 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,7 +1,7 @@
this.SVG = {
- ns: 'http://www.w3.org/2000/svg',
- xlink: 'http://www.w3.org/1999/xlink',
+ ns: 'http://www.w3.org/2000/svg',
+ xlink: 'http://www.w3.org/1999/xlink',
create: function(e) {
return document.createElementNS(this.ns, e);
@@ -11,4 +11,5 @@ this.SVG = {
for (var k in m)
o.prototype[k] = m[k];
}
+
}; \ No newline at end of file