pbfy0 / visvis

Automatically exported from code.google.com/p/visvis
Other
0 stars 0 forks source link

Use scroll wheel to zoom #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From the discussion at 
https://groups.google.com/d/msg/visvis/F33nuNIdkKY/sUDJKJDIT60J

> But what i really miss is the mouseWheel to do zooming (or something 
> else is someone wants). How difficult would that to add to visvis?? 

It would not be difficult to do for the qt backend. The difficulty lies in 
making visvis behave the same on the different backends; if I recall correctly, 
not all backend GUI toolkits support mousewheel events. I believe this is the 
main reason I did not implement it.

But it's an interesting idea. One approach would be to implement the 
mouseScroll event for the backends that support it, but do nothing with it 
internally. That means that you would have to write your own little piece of 
code to capture mousewheel events and make it zoom the axes. 

Or, we could allow the user to zoom using the RMB (as it is now) aswell as the 
scroll wheel. But I don't think that I like that (there should be just one 
obvious way to do it).

Or, we could implement scroll zooming, and allow easy switching by calling a 
certain function e.g. vv.useScrollWheelToZoom(True).
-> We could make it a setting in visvis.settings.

Original issue reported on code.google.com by almar.klein@gmail.com on 31 Mar 2012 at 12:19

GoogleCodeExporter commented 9 years ago

Original comment by almar.klein@gmail.com on 26 Apr 2012 at 8:48

GoogleCodeExporter commented 9 years ago
In retrospect I think its ok if the scroll wheel is used to zoom an axes in 
addition to the right mouse button. The rule that there should be just one way 
to do something doesn't always apply to user interfaces I guess.

Implementing this feature got me rethinking the visvis event system as a whole, 
and resulted in some nice improvements (I think).

Original comment by almar.klein@gmail.com on 16 Aug 2012 at 10:09

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 4050c3277621.

Original comment by almar.klein@gmail.com on 16 Aug 2012 at 10:09