summaryrefslogtreecommitdiffstats
path: root/src/sugar.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar.js')
-rw-r--r--src/sugar.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/sugar.js b/src/sugar.js
index e59f905..ddd4826 100644
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -7,7 +7,7 @@ var sugar = {
}
}
-// Add sugar for fill and stroke
+// Add sugar for fill and stroke
;['fill', 'stroke'].forEach(function(m) {
var i, extension = {}
@@ -18,7 +18,7 @@ var sugar = {
this.attr(m, o)
else
- // set all attributes from sugar.fill and sugar.stroke list
+ // set all attributes from sugar.fill and sugar.stroke list
for (i = sugar[m].length - 1; i >= 0; i--)
if (o[sugar[m][i]] != null)
this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])
@@ -37,7 +37,9 @@ SVG.extend(SVG.Element, SVG.FX, {
}
// Map skew to transform
, skew: function(x, y, cx, cy) {
- return this.transform({ skewX: x, skewY: y, cx: cx, cy: cy })
+ return arguments.length == 1 || arguments.length == 3 ?
+ this.transform({ skew: x, cx: y, cy: cx }) :
+ this.transform({ skewX: x, skewY: y, cx: cx, cy: cy })
}
// Map scale to transform
, scale: function(x, y, cx, cy) {
@@ -111,4 +113,3 @@ SVG.extend(SVG.Parent, SVG.Text, SVG.FX, {
return this
}
})
-