-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New pages: DOMMatrix.invert() #37172
Conversation
Preview URLs
Flaws (20)URL:
URL:
URL:
(comment last updated: 2024-12-12 20:03:21) |
|
||
{{APIRef("Geometry Interfaces")}}{{AvailableInWorkers}} | ||
|
||
The **`invertSelf()`** method of the {{domxref("DOMMatrix")}} interface inverts the original matrix. If the matrix cannot be inverted, the new matrix's components are all set to `NaN` and its {{domxref("DOMMatrix.is2D", "is2D")}} property is set to `false`. The original matrix is not changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning to write a page for is2D
? Currently it's not a link in https://pr37172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/DOMMatrixReadOnly#instance_properties.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original matrix is not changed.
Are you sure about this? The example logs the original matrix and it seems to have changed (it seems to be the same as the returned one:
const matrix = new DOMMatrix().rotate(30);
const matrix2 = matrix.invertSelf();
console.log(matrix===matrix2); // true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning to write a page for
is2D
? Currently it's not a link in https://pr37172.content.dev.mdn.mozit.cloud/en-US/docs/Web/API/DOMMatrixReadOnly#instance_properties.
That page is in PR #37169
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch. I missed it when editing the 'save as' from the dommatrixreadonly version of the inversion property.
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: wbamberg <will@bootbonnet.ca>
Co-authored-by: wbamberg <will@bootbonnet.ca>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks @estelle !
part of openwebdocs/project#214