From 4c72f3f89e53970862a501dd1398544b8a22ceca Mon Sep 17 00:00:00 2001 From: DD Date: Wed, 27 Jun 2018 16:29:46 -0400 Subject: [PATCH] For SVG import, If second argument is missing in translate, assume that it's zero. Currently it assumes that y matches x if y is missing. --- src/svg/SvgImport.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index 21cfe12f..89456f2d 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -378,7 +378,8 @@ new function() { matrix.rotate(v[0], v[1], v[2]); break; case 'translate': - matrix.translate(v[0], v[1]); + var v1 = (typeof v[1] === 'number') ? v[1] : 0; + matrix.translate(v[0], v1); break; case 'scale': matrix.scale(v);