You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
MousePanningExample v1.00
This function offers a simple template that demonstrates custom panning behavior bound to mouse movement. This Fcn doe NOT use the native |pan| function.
Default behavior is to pan the designated axis when the MIDDLE MOUSE button is held and dragged. This can be changed to the LEFT MOUSE or RIGHT MOUSE by simply changing the expected click type in the |startPan| fcn below.
This example was inspired by the excellent |akZoom| fnc written by Alexander Kessel. I've deconstructed it a bit in order to make it easier to incorporate with GUIs that already have actions bound to the 'mouse up' and 'mouse down' callbacks.
Cite As
Meade (2026). MousePanningExample (https://uk.mathworks.com/matlabcentral/fileexchange/62364-mousepanningexample), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: akZoom
General Information
- Version 1.0.0.0 (4.59 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
