mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1391014 - take in account the ancestor's transformation too for the current matrix; r=gl
MozReview-Commit-ID: Dc4DU3wPzU8 --HG-- extra : rebase_source : ba22fb39f0415a565167f2da21970acc4e78cdbc
This commit is contained in:
parent
a33ac3ffff
commit
95da87767f
@ -120,7 +120,7 @@ exports.isIdentity = isIdentity;
|
||||
|
||||
/**
|
||||
* Returns the transformation matrix for the given node, relative to the ancestor passed
|
||||
* as second argument.
|
||||
* as second argument; considering the ancestor transformation too.
|
||||
* If no ancestor is specified, it will returns the transformation matrix relative to the
|
||||
* node's parent element.
|
||||
*
|
||||
@ -132,7 +132,8 @@ exports.isIdentity = isIdentity;
|
||||
* The transformation matrix.
|
||||
*/
|
||||
function getNodeTransformationMatrix(node, ancestor = node.parentElement) {
|
||||
let { a, b, c, d, e, f } = node.getTransformToAncestor(ancestor);
|
||||
let { a, b, c, d, e, f } = ancestor.getTransformToParent()
|
||||
.multiply(node.getTransformToAncestor(ancestor));
|
||||
|
||||
return [
|
||||
a, c, e,
|
||||
|
Loading…
x
Reference in New Issue
Block a user