aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-12-29 12:49:35 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2015-12-29 12:49:35 +0100
commit050a84628f1b51e03f3a8245ed176b80571631b1 (patch)
tree8ef56492b4a8b9d2064c5e080596dc638d7e38ae /src
parent2b97c7e4199427fd7cca5928cf68945bd388df7e (diff)
parenta7eaeb4b06319fd78a586dfb6fb4d82710fd9d6f (diff)
downloadsvg.js-050a84628f1b51e03f3a8245ed176b80571631b1.tar.gz
svg.js-050a84628f1b51e03f3a8245ed176b80571631b1.zip
Merge pull request #434 from makarti/x-and-y-methods-string-parameter-issue
fix #433
Diffstat (limited to 'src')
-rw-r--r--src/group.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/group.js b/src/group.js
index df5c001..05d144c 100644
--- a/src/group.js
+++ b/src/group.js
@@ -9,11 +9,11 @@ SVG.G = SVG.invent({
, extend: {
// Move over x-axis
x: function(x) {
- return x == null ? this.transform('x') : this.transform({ x: -this.x() + x }, true)
+ return x == null ? this.transform('x') : this.transform({ x: x - this.x() }, true)
}
// Move over y-axis
, y: function(y) {
- return y == null ? this.transform('y') : this.transform({ y: -this.y() + y }, true)
+ return y == null ? this.transform('y') : this.transform({ y: y - this.y() }, true)
}
// Move by center over x-axis
, cx: function(x) {
@@ -47,4 +47,4 @@ SVG.G = SVG.invent({
return this.put(new SVG.G)
}
}
-}) \ No newline at end of file
+})