aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-19 16:45:31 +0100
committerwout <wout@impinc.co.uk>2012-12-19 16:45:31 +0100
commitb398d7bb450098fe5f1ed296e0b1a19876760ce0 (patch)
tree870310ada1345444e83b78d075847df3ffb0e9e8 /src
parentdfa324f1cb9c562a198ad2f9909bbb8d44807936 (diff)
downloadsvg.js-b398d7bb450098fe5f1ed296e0b1a19876760ce0.tar.gz
svg.js-b398d7bb450098fe5f1ed296e0b1a19876760ce0.zip
Made absolute transformations default
Diffstat (limited to 'src')
-rw-r--r--src/element.js4
-rw-r--r--src/sugar.js7
2 files changed, 4 insertions, 7 deletions
diff --git a/src/element.js b/src/element.js
index 35464ad..87ae198 100644
--- a/src/element.js
+++ b/src/element.js
@@ -53,12 +53,12 @@ SVG.extend(SVG.Element, {
},
// transformations
- transform: function(t, a) {
+ transform: function(t, r) {
var n = [],
s = this.attr('transform') || '',
l = s.match(/([a-z]+\([^\)]+\))/g) || [];
- if (a === true) {
+ if (r !== true) {
var v = t.match(/^([A-Za-z\-]+)/)[1],
r = new RegExp('^' + v);
diff --git a/src/sugar.js b/src/sugar.js
index dda1aa3..18f422e 100644
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -24,9 +24,6 @@ SVG.extend(SVG.Shape, {
if (s[a[i]] != null)
this.attr('stroke-' + a[i], s[a[i]]);
- //-D if (this.attrs['fill-opacity'] == null)
- //-D this.fill({ opacity: 0 });
-
return this;
}
@@ -42,7 +39,7 @@ SVG.extend(SVG.Element, {
if (o.x == null) o.x = b.cx;
if (o.y == null) o.y = b.cy;
- return this.transform('rotate(' + (o.deg || 0) + ' ' + o.x + ' ' + o.y + ')', o.absolute);
+ return this.transform('rotate(' + (o.deg || 0) + ' ' + o.x + ' ' + o.y + ')', o.relative);
}
});
@@ -52,7 +49,7 @@ SVG.extend(SVG.G, {
// move using translate
move: function(x, y) {
- return this.transform('translate(' + x + ' ' + y + ')', true);
+ return this.transform('translate(' + x + ' ' + y + ')');
}
});