titusjan / argos

Argos: a data viewer that can read HDF5, NetCDF4, and other file formats.
GNU General Public License v3.0
176 stars 26 forks source link

More zoom/pan modes? #8

Closed naught101 closed 7 years ago

naught101 commented 7 years ago

Currently there are these zoom/pan modes, that I can figure out:

It would be really nice to be able to use a few more of the pan and zoom modes available in PyQtGraph, specifically:

The first two of these are already available in PyQtGraph, the first one just needs to be turned on - I'm not sure why the second is not working. The third option probably needs new functionlity in PyQtGraph, but I though I'd post this here first and check.

This is some really nice software. I've been looking for something like this for ages :) Both

titusjan commented 7 years ago

Thanks for the feedback.

I have added a rectangle zoom mode configuration option that can be used to turn on the rectangle zooming mode. The default is still panning mode. I am slightly disappointed that the middle mouse button will also draw rectangles in rectangle zoom mode. The PyQtGraph docs say that: "Dragging the mouse with the wheel pressed down will always pan the scene".

The RMB-drag was disabled because it interfered with the context-menu (which overrides the standard PyQtGraph context menu since I don't want to support all its options). However I managed to fix it so RPM-drag zooming is now enabled.

You can try both fixes in the development branch.

About the axis LMB-drag, indeed this should be a feature request for PyQtGraph. It would be my preference that it only works for either the left or middle mouse button, and that the other mouse remains as-is and only drags. This way it is still possible to do only dragging on the axis.

naught101 commented 7 years ago

Cool, thanks.

I forgot to link back, but I already posted that MMB drag bug at https://github.com/pyqtgraph/pyqtgraph/issues/522

I'll post the LMB-Axis drag bug there too.