From 412b37652b6695a6df4c214d7048275f2912dad7 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sat, 10 Oct 2015 17:16:12 +0200 Subject: fixes pattern animation (#385) --- src/attr.js | 7 +++++++ src/fx.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/attr.js b/src/attr.js index 9340981..2d9e8f9 100644 --- a/src/attr.js +++ b/src/attr.js @@ -1,6 +1,13 @@ SVG.extend(SVG.Element, { // Set svg element attribute attr: function(a, v, n) { + // ensure right tranform attribute + if (a == 'transform') + if(this instanceof SVG.Pattern) + a = 'patternTransform' + else if(this instanceof SVG.Gradient) + a = 'gradientTransform' + // act as full getter if (a == null) { // get an object of attributes diff --git a/src/fx.js b/src/fx.js index 7a480dd..4ed85a2 100644 --- a/src/fx.js +++ b/src/fx.js @@ -228,7 +228,7 @@ SVG.FX = SVG.invent({ v = this.attrs[a].destination.multiply(v) // prepare matrix for morphing - this.attrs[a] = this.target.ctm().morph(v) + this.attrs[a] = (new SVG.Matrix(this.target)).morph(v) // add parametric rotation values if (this.param) { -- cgit v1.2.3