From d0d4f865246845fcdd409632d499cb0f15599670 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Sat, 2 Jun 2018 13:51:18 +0200 Subject: first tries to make transformations work --- src/morph.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/morph.js') diff --git a/src/morph.js b/src/morph.js index 54d7d53..bea349d 100644 --- a/src/morph.js +++ b/src/morph.js @@ -143,6 +143,7 @@ SVG.Morphable.NonMorphable = SVG.invent({ }) SVG.Morphable.TransformBag = SVG.invent({ + inherit: SVG.Matrix, create: function (obj) { if(Array.isArray(obj)) { obj = { @@ -154,16 +155,14 @@ SVG.Morphable.TransformBag = SVG.invent({ translateY: obj[5] } } - this.value = new SVG.Matrix(obj) + + SVG.Matrix.call(this, obj) + //this.value = new SVG.Matrix(obj) }, extend: { - valueOf: function () { - return this.value - }, - toArray: function (){ - var v = this.value.decompose() + var v = this.decompose() return [ v.scaleX, -- cgit v1.2.3