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

fix(fabric.util): unwanted mutation in fabric.util.rotatePoint #7117

Merged
merged 1 commit into from
Jun 13, 2021

Conversation

asturur
Copy link
Member

@asturur asturur commented Jun 13, 2021

The function subctratEquals is mutating the original point, this is an issue of the point class where half method mutate, half don't.

This fixes the bug for the rotate point method, since returning a new point and mutating the input does not make sense.

close #7055

@github-actions
Copy link
Contributor

github-actions bot commented Jun 13, 2021

Code Coverage Summary

> fabric@4.5.0 coverage:report /home/runner/work/fabric.js/fabric.js
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   82.94 |    76.96 |   85.75 |   82.64 |                                               
 fabric.js |   82.94 |    76.96 |   85.75 |   82.64 | ...,29686,29811,29891-29956,30079,30178,30395 
-----------|---------|----------|---------|---------|-----------------------------------------------

@asturur asturur merged commit 479a724 into master Jun 13, 2021
@asturur asturur mentioned this pull request Jun 20, 2021
@asturur asturur deleted the rotate-point-bug branch August 8, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fabric.util.rotatePoint mutates partially the given point but returns a new one
1 participant