From 1f3eeddc4a188d0d9a1b581e2ce32106112bfdfc Mon Sep 17 00:00:00 2001 From: wout Date: Wed, 29 May 2013 16:35:33 +0100 Subject: Added translate() method --- src/sugar.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sugar.js b/src/sugar.js index d063207..9630b3d 100644 --- a/src/sugar.js +++ b/src/sugar.js @@ -50,8 +50,15 @@ SVG.extend(SVG.Element, SVG.FX, { // Scale , scale: function(x, y) { return this.transform({ - scaleX: x, - scaleY: y == null ? x : y + scaleX: x + , scaleY: y == null ? x : y + }) + } + // Translate +, translate: function(x, y) { + return this.transform({ + x: x + , y: y }) } // Matrix -- cgit v1.2.3