-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Editor] Add validation for the target element of curve endpoints #19373
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
[Editor] Add validation for the target element of curve endpoints #19373
Conversation
Please make sure that first line of the commit message agrees with the PR title. |
Thanks for the point. |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/08d5cd1eadb235d/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/3dd5fa05a6036bf/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/08d5cd1eadb235d/output.txt Total script time: 10.99 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/3dd5fa05a6036bf/output.txt Total script time: 27.15 mins
|
This patch fixes a bug that caused incorrect curve shapes when an endpoint lies beyond the page boundaries. It adds a check for the endpoint's position, and if it is outside the page, the point is excluded from the shape's coordinates.
I understand I must to squash commits. I read this guide. I trying to do it. |
0771d73
to
104e1c3
Compare
I completed squash. |
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.241.84.105:8877/20805903f48370b/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @calixteman received. Current queue size: 0 Live output at: http://54.193.163.58:8877/999e53e85110a5e/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/20805903f48370b/output.txt Total script time: 10.85 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/999e53e85110a5e/output.txt Total script time: 25.71 mins
|
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.
LGTM. Thank you.
@calixteman @Snuffleupagus Thanks for support. |
Issue: drawing a shape may have an unwanted path element added.
Steps to reproduce:
Go to https://mozilla.github.io/pdf.js/web/viewer.html;
Select the pen tool and draw a shape on the second page;
While drawing the shape, move the cursor out of the left-hand side of the second page, then stop the action.
On the third step, the shape will be extended with a path element that starts where the cursor left the page and ends at a random position on the page. Correct this issue to ensure that the path element is not added.
Fix: Incorrect End Position of Curve on Target Page
The issue of the curve's unintended end position is caused by obtaining improper coordinates from the end-drawing event. These coordinates are derived from an element other than the intended target page.
Changes:
To resolve this, I added a check to verify the element where the drawing ends. If the drawing ends on an element other than the target page, the coordinates registration are skipped.
Notes: