From 03319cedd44b2f4de15d365cf1fa6699aead4af1 Mon Sep 17 00:00:00 2001 From: Benjamin Besse Date: Thu, 21 Nov 2013 11:15:09 +0100 Subject: [PATCH] @ fix bug for transform="translate(x)" if element has transform="translate(5)", snap.svg ignore that but it works and it's possible on transform attribute. --- src/svg.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/svg.js b/src/svg.js index faec271..44b60a6 100644 --- a/src/svg.js +++ b/src/svg.js @@ -1163,7 +1163,9 @@ function transform2matrix(tstr, bbox) { x2, y2, bb; - if (command == "t" && tlen == 3) { + if (command == "t" && tlen == 2){ + m.translate(t[1], 0); + } else if (command == "t" && tlen == 3) { if (absolute) { x1 = inver.x(0, 0); y1 = inver.y(0, 0); @@ -3751,4 +3753,4 @@ Snap.plugin = function (f) { }; glob.win.Snap = Snap; return Snap; -}()); \ No newline at end of file +}());