From 5e9ab52bd68670208ac25cfcf95cca178d285545 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 28 Jul 2014 22:16:35 +0200 Subject: Added more control to SVG.Matrix --- src/sugar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/sugar.js') diff --git a/src/sugar.js b/src/sugar.js index 52f5697..cc01c00 100755 --- a/src/sugar.js +++ b/src/sugar.js @@ -34,8 +34,8 @@ SVG.extend(SVG.Element, SVG.FX, { return this.transform({ rotation: d, cx: cx, cy: cy }) } // Map skew to transform -, skew: function(x, y) { - return this.transform({ skewX: x, skewY: y }) +, skew: function(x, y, cx, cy) { + return this.transform({ skewX: x, skewY: y, cx: cx, cy: cy }) } // Map scale to transform , scale: function(x, y, cx, cy) { @@ -47,6 +47,10 @@ SVG.extend(SVG.Element, SVG.FX, { , translate: function(x, y) { return this.transform({ x: x, y: y }) } + // Map flip to transform +, flip: function(a, o) { + return this.transform({ flip: a, offset: o }) + } // Map matrix to transform , matrix: function(m) { return this.attr('transform', new SVG.Matrix(m)) -- cgit v1.2.3