summaryrefslogtreecommitdiffstats
path: root/src/attr.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/attr.js')
-rw-r--r--src/attr.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/attr.js b/src/attr.js
index 9340981..2d9e8f9 100644
--- a/src/attr.js
+++ b/src/attr.js
@@ -1,6 +1,13 @@
SVG.extend(SVG.Element, {
// Set svg element attribute
attr: function(a, v, n) {
+ // ensure right tranform attribute
+ if (a == 'transform')
+ if(this instanceof SVG.Pattern)
+ a = 'patternTransform'
+ else if(this instanceof SVG.Gradient)
+ a = 'gradientTransform'
+
// act as full getter
if (a == null) {
// get an object of attributes