Skip to content

Commit

Permalink
Fix an issue with zooming in PlotView on a Mac
Browse files Browse the repository at this point in the history
- shift is not passed as a modifier if held while scrolling a mouse
  • Loading branch information
ejeschke committed Nov 12, 2024
1 parent 3373608 commit b394bcd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ginga/gw/PlotView.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,11 +964,13 @@ def plot_do_zoom(self, cb_obj, event):
if 'ctrl' in event.modifiers:
# only horizontal
delta_y = 1.0
elif 'shift' in event.modifiers:
# only horizontal
elif 'shift' in event.modifiers or 'alt' in event.modifiers:
# only vertical
# (shift works on Linux, but not Mac; alt works on Mac but
# not Linux....Grrr)
delta_x = 1.0

if 'meta' in event.modifiers:
if 'meta' in event.modifiers or 'cmd' in event.modifiers:
# cursor position
cur_x, cur_y = event.data_x, event.data_y
if None not in [cur_x, cur_y]:
Expand Down

0 comments on commit b394bcd

Please sign in to comment.