Closed rogerz closed 9 years ago
Thanks for the patch! I'm hesitant to add this capability due to the order-dependent and repeatable nature of transforms. Affine transformations are not commutative. for (var x in y)
has no guarantee of order in JS and a JS implementation/cross browser behavior change could break people's code if objects are used this way. Additionally, this interface does not allow for multiples of the same kind of transform (e.g. "translate() rotate() translate()"). I understand that "insertion order for everything except integer indexes" is the de facto standard right now but it's not something I want to rely on.
Good point. The origin of this patch was to generate transform parameters from an layout algorithm and use it later.
It seems a better solution should be save directly the transform string instead of an object.
See tests for details