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 preview panel dragging experience #203

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

binstarjs03
Copy link
Contributor

This pull request do a very tiny change, but critical to the user experience.
Preview panel dragging is clunky if zoom level above 1. The higher the zoom level, the worser it is. This issue fixed by changing datatype that shifting the chunk position in preview panel from int to float. This happens probably rounding error and such.

Here we are creating a variable that representing a vector (displacement) that shift the chunk image on preview panel. If we use int for that, we would not be able to use intermediate values such as 1.2, 3.6 etc so more precision needed, and that's why we should use float instead of int for this particular variable

edited

Preview panel dragging is clunky if zoom level above 1. The higher the zoom level, the worser it is.
This issue fixed by changing datatype that shifting the chunk position in preview panel from int to float. This happens probably rounding error and such
@mmdanggg2
Copy link
Collaborator

Looks good, that always bugged me but I never took the time to look at it 😄

@binstarjs03
Copy link
Contributor Author

Well, i think that's all i can do for now. I'm interested in adding status bar (bottom bar) that tells you what block and its coordinate your mouse cursor is pointing at, it's a very helpful little feature. But since i never code in Java (I code in C#), this is all i can do for now. I need more time to understand the Java library (such as AWT) and how your code works. Feel free to merge

@binstarjs03 binstarjs03 marked this pull request as ready for review November 15, 2022 08:41
@mmdanggg2 mmdanggg2 merged commit 7913834 into jmc2obj:master Nov 15, 2022
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.

2 participants