首先获取一个矩阵。
this.getMatrix = function(obj)
{
    var matrix = obj.css("-webkit-transform") ||
                 obj.css("-moz-transform")    ||
                 obj.css("-ms-transform")     ||
                 obj.css("-o-transform")      ||
                 obj.css("transform");
    return matrix;
};
并且获得了规模的价值。
this.getScaleDegrees = function(obj)
{
    var matrix = this.getMatrix(obj),
        matrixRegex = /matrix\((-?\d*\.?\d+),\s*0,\s*0,\s*(-?\d*\.?\d+),\s*0,\s*0\)/,
        matches = matrix.match(matrixRegex);
    return matches;
};
并获得一个旋转的值。
this.getRotationDegrees = function(obj)
{
    var matrix = this.getMatrix(obj),
        angle = 0;
    if(matrix !== 'none') {
        var values = matrix.split('(')[1].split(')')[0].split(','),
            a = values[0],
            b = values[1];
        angle = Math.round(Math.atan2(b, a) * (180/Math.PI));
    }
    return angle;
};
现在,我面临一个问题。
当元素同时存在旋转和缩放时,函数“getScaleDegrees”失败。
由于函数'getRotationDegrees'正常运行,
我想我将在函数'getRotationDegrees'的过程的帮助下编辑函数'getScaleDegrees'。
所以,问题是如何获得规模的价值。
有什么好的想法或计算方法吗?
编辑:
有一个改变比例和旋转的功能,并且比例和旋转的值每次都不同。函数'getMatrix'返回的值变成这样。
none [no rotate & no scale]  
matrix(1.2, 0, 0, 1.2, 0, 0) [edit scale]  
matrix(0.965926, -0.258819, 0.258819, 0.965926, 0, 0) [edit rotate]  
matrix(1.3523, -0.362347, 0.362347, 1.3523, 0, 0) [edit rotate & edit scale]