diff options
author | Rémi Tétreault <tetreault.remi@gmail.com> | 2018-04-21 16:38:29 -0400 |
---|---|---|
committer | Rémi Tétreault <tetreault.remi@gmail.com> | 2018-04-21 16:40:35 -0400 |
commit | b0ca7491ace6f404c82607f59b22aaa3419ad0c0 (patch) | |
tree | 1d0767962c1aba2643c865320741c131a510bc5c /src | |
parent | e4281c8d426404306b6df950531dca4c8c994c61 (diff) | |
download | svg.js-b0ca7491ace6f404c82607f59b22aaa3419ad0c0.tar.gz svg.js-b0ca7491ace6f404c82607f59b22aaa3419ad0c0.zip |
Fix issue #847
Animating a path by calling .attr() now work
Diffstat (limited to 'src')
-rw-r--r-- | src/fx.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -750,8 +750,13 @@ SVG.MorphObj = SVG.invent({ create: function(from, to){ // prepare color for morphing if(SVG.Color.isColor(to)) return new SVG.Color(from).morph(to) - // prepare value list for morphing - if(SVG.regex.delimiter.test(from)) return new SVG.Array(from).morph(to) + // check if we have a list of values + if(SVG.regex.delimiter.test(from)) { + // prepare path for morphing + if(SVG.regex.pathLetters.test(from)) return new SVG.PathArray(from).morph(to) + // prepare value list for morphing + else return new SVG.Array(from).morph(to) + } // prepare number for morphing if(SVG.regex.numberAndUnit.test(to)) return new SVG.Number(from).morph(to) |