mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-18 21:20:59 +00:00
Changed nestTransformMatrices to mutilplyTransformMatrices
This commit is contained in:
parent
bd058e6a94
commit
3950298c75
2 changed files with 5 additions and 5 deletions
|
|
@ -11,7 +11,7 @@
|
|||
extend = fabric.util.object.extend,
|
||||
capitalize = fabric.util.string.capitalize,
|
||||
clone = fabric.util.object.clone,
|
||||
nestTransformMatrices = fabric.util.nestTransformMatrices;
|
||||
multiplyTransformMatrices = fabric.util.multiplyTransformMatrices;
|
||||
|
||||
var attributesMap = {
|
||||
'cx': 'left',
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
}
|
||||
if (attr === 'transform') {
|
||||
if (parentAttributes.transformMatrix) {
|
||||
value = nestTransformMatrices(parentAttributes.transformMatrix, fabric.parseTransformAttribute(value));
|
||||
value = multiplyTransformMatrices(parentAttributes.transformMatrix, fabric.parseTransformAttribute(value));
|
||||
}
|
||||
else {
|
||||
value = fabric.parseTransformAttribute(value);
|
||||
|
|
|
|||
|
|
@ -400,12 +400,12 @@
|
|||
* Multiply matrix A by matrix B to nest transformations
|
||||
* @static
|
||||
* @memberOf fabric.util
|
||||
* @method nestTransformMatrices
|
||||
* @method multiplyTransformMatrices
|
||||
* @param {Array} matrixA First transformMatrix
|
||||
* @param {Array} matrixB Second transformMatrix
|
||||
* @return {Array} The product of the two transform matrices
|
||||
*/
|
||||
function nestTransformMatrices(matrixA, matrixB) {
|
||||
function multiplyTransformMatrices(matrixA, matrixB) {
|
||||
// Matrix multiply matrixA * matrixB
|
||||
var a = [
|
||||
[matrixA[0], matrixA[2], matrixA[4]],
|
||||
|
|
@ -459,6 +459,6 @@
|
|||
fabric.util.createCanvasElement = createCanvasElement;
|
||||
fabric.util.createAccessors = createAccessors;
|
||||
fabric.util.clipContext = clipContext;
|
||||
fabric.util.nestTransformMatrices = nestTransformMatrices;
|
||||
fabric.util.multiplyTransformMatrices = multiplyTransformMatrices;
|
||||
|
||||
})();
|
||||
Loading…
Reference in a new issue