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

Scroll to center problem #2268

Closed
willmcgugan opened this issue Apr 12, 2023 · 5 comments · Fixed by #2684
Closed

Scroll to center problem #2268

willmcgugan opened this issue Apr 12, 2023 · 5 comments · Fixed by #2684
Assignees
Labels
bug Something isn't working Task

Comments

@willmcgugan
Copy link
Collaborator

There's an issue with scroll_to_center that can be seen in the scroll_to_center.py snapshot.

Essentially it doesn't seem to scroll the inner-most container the first time, but does on the second time.

I did some debugging, and it appears that max_scroll_x and max_scroll_y are erroneously reporting zero, until the container becomes visible for the first time, then they have the correct values. The root cause seems to be that the virtual_size is the same as size, which is incorrect.

When fixing this, be careful not to break textual colors. If you click the last button it should scroll to the end.

This issue likely does touch on the compositor. I suspect it is something related to the _full_map structure.

@willmcgugan
Copy link
Collaborator Author

Apologies to @rodrigogiraoserrao , who's math was impeccable as always.

@rodrigogiraoserrao
Copy link
Contributor

Apologies to @rodrigogiraoserrao , who's math was impeccable as always.

Give me enough time, and I'll eventually make a ridiculous math error 😆

@davep davep added bug Something isn't working Task labels Apr 13, 2023
@rodrigogiraoserrao
Copy link
Contributor

For reference, likely related to #2254.

@rodrigogiraoserrao
Copy link
Contributor

Give me enough time, and I'll eventually make a ridiculous math error 😆

It just happened. 🤷

@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants