Closed ejeschke closed 1 year ago
@pllim, do you have time to take a look at this?
With +4,352 −2,572
, I don't even know where to begin. Do you have any suggestion on how to effectively vet this since I am unable to look at all the diff?
Sorry, @pllim! I realize that maybe this is a lot to digest. It's actually breaking up one large, monolithic module of all the possible user interaction event handling code into smaller, more easily understood modules. But--the API is basically the same. bindings.cfg
files are all backward-compatible. There is a bunch of new documentation added in which I tried to clarify the concept of the modes in the viewer widget, and including some new documentation on developing a mode.
Maybe just start by taking a look at the new documentation and let me know what does not seem clear or needs expanding?
Thanks for the clarification! I'll put this in my queue. If this is time sensitive, please give me a deadline.
I am unable to go through all the LOC touched here, so I only focused on the user docs, as you suggested. If this is working for your users, feel free to merge.
Thanks for the review, @pllim!
This PR refactors the code for all the modes that exist in the
ginga.Bindings
module into separate modules underginga.modes
. Modes can now be written and understood as having a very similar structure to a plugin--there are explicit constructor, start and stop methods. Mode docstrings can be written and maintained better to document the modes and the code implementing a mode is much easier to understand since it is encapsulated rather than all mixed together in one huge file.As part of this refactoring, some potentially useful functions are added to the
ImageView
class, that can be called programmatically for panning by various amounts, rotating by increments, etc.