Adapt to recent changes to Matrix#decompose() in SvgExport code.

This commit is contained in:
Jürg Lehni 2013-02-09 12:11:56 -08:00
parent be3b257175
commit d70fdb69d3

View file

@ -44,8 +44,7 @@ new function() {
function getTransform(item, coordinates) {
var matrix = item._matrix,
decomposed = matrix.decompose(),
trans = decomposed.translation,
trans = matrix.getTranslation(),
attrs = {};
if (coordinates) {
// If the item suppports x- and y- coordinates, we're taking out the
@ -62,9 +61,10 @@ new function() {
}
if (matrix.isIdentity())
return attrs;
// See if we can formulate the decomposed matrix as a simple
// See if we can decompose the matrix and can formulate it as a simple
// translate/scale/rotate command sequence.
if (!decomposed.shearing) {
var decomposed = matrix.decompose();
if (decomposed && !decomposed.shearing) {
var parts = [],
angle = decomposed.rotation,
scale = decomposed.scaling;