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

Panning via dragging #2

Closed
redneb opened this issue Apr 25, 2016 · 4 comments
Closed

Panning via dragging #2

redneb opened this issue Apr 25, 2016 · 4 comments

Comments

@redneb
Copy link

redneb commented Apr 25, 2016

It would be nice to allow panning via dragging the view with the mouse, similar to how google maps works.

@leftaroundabout
Copy link
Owner

I actually designed the zoom/scroll behaviour deliberately so this wouldn't be necessary. Scrolling out does not zoom around the mouse but around the opposite focal point, so you can quite easily “crawl along” by zooming out an in again near a screen edge. Especially for larger distances, this is more effecient than click-and-move, because the zooming gives you exponential step size. After some experience with this, I regularly wish Google Maps had this behaviour too!

crawl-scrolling

That said... I'm not altogether happy with the navigation features yet, either. In particular, the zooming messes up the aspect ratio, which is certainly a problem in many applications.

'll consider some changes. But I don't think I'd like grab&drag panning, also because it fix-assigns mouse clicks to a built-in feature. I'd like to keep clicks completely free so one can use them to e.g. drag around objects dynamically, at some point.

@redneb
Copy link
Author

redneb commented Apr 25, 2016

Scrolling out does not zoom around the mouse but around the opposite focal point, so you can quite easily “crawl along” by zooming out an in again near a screen edge.

I did notice that and it's useful sometimes, but I would still prefer the google maps behavior for some situations.

But I don't think I'd like grab&drag panning, also because it fix-assigns mouse clicks to a built-in feature. I'd like to keep clicks completely free so one can use them to e.g. drag around objects dynamically, at some point.

That can be addressed by introducing different modes for mouse clicks. Or better yet, you could use middle click dragging for panning. This is what GIMP and inkscape do.

leftaroundabout added a commit that referenced this issue Apr 25, 2016
@leftaroundabout
Copy link
Owner

Fine, here you go then. (Please test it, I don't have a mouse with middle button to do so...)

@redneb
Copy link
Author

redneb commented Apr 25, 2016

Thanks, it works fine.

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

No branches or pull requests

2 participants