-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Auto scroll when moving pattern piece is now independent from the piece's size #1156
Conversation
PR Summary 🚀
|
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.
I did not see any appreciable difference in behavior, but I am approving this, if not for any other reason than to remove code that does not perform a useful function.
It's not making the scrolling go any slower... it's just not happening as soon. I think though - as your change points out - that it's unatural to most users to autoscroll by the boundries of the item moved... as we are more conditioned to the position of the mouse hitting the scroll area boundries. I checked a lot of different apps, and they all seem to autoscroll by the mouse position, and not the edges of the moving object. I get the idea of keeping the graphic item completey visible, but the fact the size of the items are different it's probably a bit disconcerting to the brain... so by the time you realize you've hit the scroll area edge - you've already zipped off. That being said... it's a timing issue with the ensureVisible() method... I have made a fix to address the issue, where a delay is added between calling ensureVisible()'s so as to be able to control the speed of the autoscroll. More specifically I added 2 preferences... 1) Autoscroll checkbox to be able to turn the scrolling off completely 2) A speed setting - which gets inversely converted to a delay in mSleep(). I also made the changes to all the other tools such as the point labels as per Grace's request. I also added the autoscoll changes to the image tool. |
In a way it does make the scrolling slower, since with the old behavior it was possible to hold a pattern piece by its center and to move the mouse near the edge of the screen, thus having a big amount of the image out of the screen, forcing the ensureVisible() method to slide the view by a big amount each time to put back the image inside the view. With the box around the mouse, it's only possible, at maximum, to put half of the box out of the view. But of course this was only a first quick fix to address the issue, your fix with the delay does fully solve the issue, thx! 😉 |
Addresses issue #1152
In piece mode, the view starts to pan automatically with a different threshold depending on if the moved pattern piece is visible in its entirety or if we are zoomed on it. This causes the auto-pan sensibility to be quite random: it's easy to move a pattern piece very far away by mistake. And since the current auto-pan behavior depends on the size of the pattern piece moved, the auto-pan is much more sensible when moving pieces that are big on the screen than it is with small pieces.
The modification I propose here modifies this behavior so that the auto-pan threshold is independent from the pattern piece moved and only depends on the position of the mouse on the screen, like in other softwares.