From ca055e31f8d175d205b5dc96c73e9c42a8b3de86 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Fri, 21 Sep 2018 11:40:08 +0200 Subject: make sure runner[0] always exists (rework that requirement!) --- src/runner.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/runner.js b/src/runner.js index b69b1d6..2e55a1c 100644 --- a/src/runner.js +++ b/src/runner.js @@ -494,7 +494,7 @@ SVG.Runner.sanitise = function (duration, delay, when) { SVG.FakeRunner = class { - constructor (transforms, id = -1, done = true) { + constructor (transforms = new SVG.Matrix(), id = -1, done = true) { // Object.assign(this, {transforms, id, done}) this.transforms = transforms @@ -573,6 +573,8 @@ SVG.extend(SVG.Element, { delete arr[i] } }) + + this._transformationRunners[0] = new SVG.FakeRunner() }, addToCurrentTransform (transform) { @@ -682,7 +684,7 @@ SVG.extend(SVG.Runner, { } // Parse the parameters - var isMatrix = transforms.a != null + var isMatrix = isMatrixLike(transforms) affine = transforms.affine != null ? transforms.affine : (affine != null ? affine : !isMatrix) -- cgit v1.2.3