mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix transformation sequence to correctly handle combined rotate and scale commands.
Closes #583
This commit is contained in:
parent
318209e9e9
commit
f193acf31b
1 changed files with 2 additions and 2 deletions
|
@ -65,11 +65,11 @@ new function() {
|
|||
scale = decomposed.scaling;
|
||||
if (trans && !trans.isZero())
|
||||
parts.push('translate(' + formatter.point(trans) + ')');
|
||||
if (angle)
|
||||
parts.push('rotate(' + formatter.number(angle) + ')');
|
||||
if (!Numerical.isZero(scale.x - 1)
|
||||
|| !Numerical.isZero(scale.y - 1))
|
||||
parts.push('scale(' + formatter.point(scale) +')');
|
||||
if (angle)
|
||||
parts.push('rotate(' + formatter.number(angle) + ')');
|
||||
attrs.transform = parts.join(' ');
|
||||
} else {
|
||||
attrs.transform = 'matrix(' + matrix.getValues().join(',') + ')';
|
||||
|
|
Loading…
Reference in a new issue