mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Simplify code from #1528
This commit is contained in:
parent
990cf02879
commit
53897d7498
1 changed files with 2 additions and 4 deletions
|
@ -336,12 +336,10 @@ new function() {
|
||||||
new Matrix(v[0], v[1], v[2], v[3], v[4], v[5]));
|
new Matrix(v[0], v[1], v[2], v[3], v[4], v[5]));
|
||||||
break;
|
break;
|
||||||
case 'rotate':
|
case 'rotate':
|
||||||
var v2 = (typeof v[1] === 'number' && typeof v[2] !== 'number') ? 0 : v[2];
|
matrix.rotate(v[0], v[1] || 0, v[2] || 0);
|
||||||
matrix.rotate(v[0], v[1], v2);
|
|
||||||
break;
|
break;
|
||||||
case 'translate':
|
case 'translate':
|
||||||
var v1 = (typeof v[1] === 'number') ? v[1] : 0;
|
matrix.translate(v[0], v[1] || 0);
|
||||||
matrix.translate(v[0], v1);
|
|
||||||
break;
|
break;
|
||||||
case 'scale':
|
case 'scale':
|
||||||
matrix.scale(v);
|
matrix.scale(v);
|
||||||
|
|
Loading…
Reference in a new issue