From 0d237dd2c8fe3e8d91b47f9c627695d870a93d39 Mon Sep 17 00:00:00 2001 From: Mike Sierra Date: Wed, 9 Oct 2013 17:06:53 -0400 Subject: [PATCH] VERIFY new values for Matrix.scale --- src/svg.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/svg.js b/src/svg.js index 0c17c2e..3485dcc 100644 --- a/src/svg.js +++ b/src/svg.js @@ -447,15 +447,16 @@ function Matrix(a, b, c, d, e, f) { matrixproto.translate = function (x, y) { return this.add(1, 0, 0, 1, x, y); }; + // SIERRA: do cx/cy default to the center point, as in CSS? If so, Snap appears to resolve important discrepancies between how transforms behave in SVG & CSS. /*\ * Matrix.scale [ method ] ** * Scales the matrix - - x (number) - - y (number) #optional - - cx (number) #optional - - cy (number) #optional + - x (number) amount to be scaled, with `1` resulting in no change VERIFY + - y (number) #optional amount to scale along the vertical axis. (Otherwise `x` applies to both axes.) + - cx (number) #optional horizontal origin point from which to scale VERIFY + - cy (number) #optional vertical origin point from which to scale \*/ matrixproto.scale = function (x, y, cx, cy) { y == null && (y = x);