summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-09-21 11:40:08 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-09-21 11:40:08 +0200
commitca055e31f8d175d205b5dc96c73e9c42a8b3de86 (patch)
tree7e3b54864d0005d0366c4d77fa6939aa37debee8 /src
parentf2ce5e6b1c8441194e0bcbc11b0a0d6bebccdfb9 (diff)
downloadsvg.js-ca055e31f8d175d205b5dc96c73e9c42a8b3de86.tar.gz
svg.js-ca055e31f8d175d205b5dc96c73e9c42a8b3de86.zip
make sure runner[0] always exists (rework that requirement!)
Diffstat (limited to 'src')
-rw-r--r--src/runner.js6
1 files changed, 4 insertions, 2 deletions
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)