Skip to content
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

Merged
merged 7 commits into from
Dec 12, 2024
Merged

New pages: DOMMatrix.invert() #37172

merged 7 commits into from
Dec 12, 2024

Conversation

estelle
Copy link
Member

@estelle estelle commented Dec 10, 2024

@estelle estelle requested a review from a team as a code owner December 10, 2024 20:59
@estelle estelle requested review from wbamberg and removed request for a team December 10, 2024 20:59
@github-actions github-actions bot added Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed labels Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 2024

Preview URLs

Flaws (20)

URL: /en-US/docs/Web/API/DOMMatrix/invertSelf
Title: DOMMatrix: invertSelf() method
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/DOMMatrix/is2D does not exist

URL: /en-US/docs/Web/API/DOMMatrixReadOnly
Title: DOMMatrixReadOnly
Flaw count: 17

  • macros:
    • /en-US/docs/Web/API/DOMMatrixReadOnly/flipY does not exist
    • /en-US/docs/Web/API/DOMMatrixReadOnly/multiply does not exist
    • /en-US/docs/Web/API/DOMMatrixReadOnly/rotateAxisAngle does not exist
    • /en-US/docs/Web/API/DOMMatrixReadOnly/rotate does not exist
    • /en-US/docs/Web/API/DOMMatrixReadOnly/rotateFromVector does not exist
    • and 12 more flaws omitted

URL: /en-US/docs/Web/API/DOMMatrixReadOnly/inverse
Title: DOMMatrixReadOnly: inverse() method
Flaw count: 2

  • macros:
    • /en-US/docs/Web/API/DOMMatrixReadOnly/is2D does not exist
    • /en-US/docs/Web/API/DOMMatrixReadOnly/flipY does not exist

(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.
Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Member Author

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

Copy link
Member Author

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.

files/en-us/web/api/dommatrix/invertself/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/dommatrixreadonly/inverse/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/dommatrixreadonly/inverse/index.md Outdated Show resolved Hide resolved
files/en-us/web/api/dommatrixreadonly/inverse/index.md Outdated Show resolved Hide resolved
@estelle estelle requested a review from wbamberg December 12, 2024 20:04
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks @estelle !

@wbamberg wbamberg merged commit 473a33d into main Dec 12, 2024
9 checks passed
@wbamberg wbamberg deleted the invert branch December 12, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants