-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
fix(Canvas): flipped viewport transform coords #7515
fix(Canvas): flipped viewport transform coords #7515
Conversation
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
@ShaMan123 if you have time to move this PR in a branch i can look into test failures and finish it. |
@asturur ? |
Should we rebase? Update from master? I'll leave it to you. |
Cause I'm afraid of unwanted overwrite |
one test needed to be updated, since it had a flipped viewport, and so the new function was supposed to change the test result. |
Motivation
#7471
gist
When flipped (negative scale)
Object.isOnScreen
breaks because it tried to check if a point is withinvptCoords
which always returnedfalse
because when flippedtl
was greater thanbr
.Important
I've adjusted tests.
I need you to review that they are good enough, viewport transform is confusing.
The test enhancement exposed another bug with
isPartiallyOnScreen
.It's test used stale canvas state, that is why it passed. Now it fails.
The reason it fails is because the rect has a common line with canvas vpt so the intersection test running in
isPartiallyOnScreen
returns true. But it is wrong.isPartiallyOnScreen
should return false in this case, which is unhandled.