Fix transformation sequence to correctly handle combined rotate and scale commands.

Closes #583
This commit is contained in:
Jürg Lehni 2014-12-02 22:31:20 -08:00
parent 318209e9e9
commit f193acf31b

View file

@ -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(',') + ')';