-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Probably the most difficult script requests I get are for ones which handle mouse events, I have to relearn how this works each time. The mouse event stuff was developed early in Das2, meant to mimic PaPCo's mouse modules. There are two classes which work together:
- Drag Renderer, which creates events
- Mouse Module, which handles mouse events to provide science functionality
The DasMouseInputAdapter is the class that manages MouseModules. The problem is there are two types of events and when events are fired. Further, both the DragRenderer and MouseModule need to agree on when events are fired.
This needs to be cleaned up with non-breaking changes to the code, and good examples provided for use in Autoplot.
Last, we briefly thought several mouse modules would respond to a mouse click, so inside DasMouseInputAdapter each mouse button has an array of MouseModules, and presently the array is always a singleton MouseModule. This needs to be refactored, tearing out this generality and simplifying the code. (If we do want to have a multiple Mouse Modules respond to a click, this can still be done with a new Mouse Module which broadcasts events to multiple Mouse Modules.