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

ENH: Add pinch-to-zoom #26

Merged
merged 1 commit into from
Jul 2, 2020
Merged

ENH: Add pinch-to-zoom #26

merged 1 commit into from
Jul 2, 2020

Conversation

larsoner
Copy link
Contributor

Closes #19

Copy link
Member

@akaszynski akaszynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Let me know when we need to push a release.

@akaszynski
Copy link
Member

@larsoner, once you've been approved as a developer, you should be able to merge the PR. Let me know if you have any issues.

@larsoner
Copy link
Contributor Author

larsoner commented Jul 1, 2020

@hoechenberger can you test and verify that it works for you ?

@hoechenberger
Copy link
Contributor

@larsoner

@hoechenberger can you test and verify that it works for you ?

Will give it a shot in a couple hours and report back

@hoechenberger
Copy link
Contributor

It's working 😍🥳🥂 Could be a little bit smoother (smaller steps, perhaps?) but otherwise works as expected!!

Screen-Recording-2020-07-02-at-13 40 49

I suppose continuous update like shown below (with reduced quality until the action is finished) wouldn't be possible..?

Untitled

@larsoner
Copy link
Contributor Author

larsoner commented Jul 2, 2020

I think that's just as fast as the events get processed by qt. I experience the same thing with the scroll wheel

@larsoner larsoner merged commit f7be58c into pyvista:master Jul 2, 2020
@larsoner larsoner deleted the pinch branch July 2, 2020 12:29
@banesullivan
Copy link
Member

Smooth scrolling is possible while holding the control key (mac) plus click and drag. You may be able to use those same events to control the smoothness?

@hoechenberger
Copy link
Contributor

Smooth scrolling is possible while holding the control key (mac) plus click and drag. You may be able to use those same events to control the smoothness?

Indeed this does work! I keep pressing Ctrl and then use pinch-to-zoom, and it's smooth. I think this behavior should be the default for pinch zooming :)

@banesullivan
Copy link
Member

I'm not sure if we can (or should) change that default zoom style. There may be performance concerns. The change would likely be upstream in PyVista though

@hoechenberger
Copy link
Contributor

I'm not sure if we can (or should) change that default zoom style. There may be performance concerns. The change would likely be upstream in PyVista though

I'm just talking about the new pinch zooming :) All other existing zoom functionality can remain the same.

@hoechenberger
Copy link
Contributor

Smooth scrolling is possible while holding the control key (mac) plus click and drag.

I can also get this behavior by pressing right mouse button and then scrolling.

@banesullivan
Copy link
Member

You may be able to trigger the control key events with what was implemented here to do it

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.

ENH: Pinch-to-zoom support
4 participants