Merge pull request #14 from fsih/bearEars

Fix SVG import of translate with one argument
This commit is contained in:
DD Liu 2018-06-27 16:55:54 -04:00 committed by GitHub
commit 51a1b93df6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -375,10 +375,12 @@ new function() {
new Matrix(v[0], v[1], v[2], v[3], v[4], v[5]));
break;
case 'rotate':
matrix.rotate(v[0], v[1], v[2]);
var v2 = (typeof v[1] === 'number' && typeof v[2] !== 'number') ? 0 : v[2];
matrix.rotate(v[0], v[1], v2);
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);