Skip to content

Fix preview panel dragging experience#203

Merged
mmdanggg2 merged 1 commit into
jmc2obj:masterfrom
binstarjs03:previewPanel-enhance
Nov 15, 2022
Merged

Fix preview panel dragging experience#203
mmdanggg2 merged 1 commit into
jmc2obj:masterfrom
binstarjs03:previewPanel-enhance

Conversation

@binstarjs03

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@binstarjs03

Copy link
Copy Markdown
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
Comment thread src/org/jmc/gui/PreviewPanel.java
@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