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: adjust calculation of element highlighter positions #1698

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

eglitise
Copy link
Collaborator

This PR fixes the issue where element highlighters over the screenshot were sometimes drawn over incorrect coordinates. This commonly happened when starting a session directly into landscape mode, or resizing the Inspector window height (not width). The underlying cause was that the scale ratio for drawing highlighters was using old data.
The overall implementation has also been slightly simplified, and the unnecessary 500ms debounce was removed, so now the highlighter update is subject to the same 50ms debounce used for calculating the screenshot scale - it feels much more responsive.

Fixes #1680.

@github-actions github-actions bot added the fix This resolves a user-facing problem label Sep 17, 2024
@eglitise eglitise merged commit 8efd060 into appium:main Sep 17, 2024
6 checks passed
@eglitise eglitise deleted the fix-highlighter-position-update branch September 17, 2024 13:32
Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

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

amazing, thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix This resolves a user-facing problem
Projects
None yet
3 participants