10000 Add Support for `scroll_event` in WebAgg and NbAgg [backport to 1.4.x] by blink1073 · Pull Request #3968 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add Support for scroll_event in WebAgg and NbAgg [backport to 1.4.x] #3968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jan 11, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add scroll event handling to webagg backend
Conflicts:
	lib/matplotlib/backends/backend_webagg_core.py
  • Loading branch information
blink1073 committed Jan 11, 2015
commit 14d396e1778a4fe2acb21104d192e4ee77d3f086
4 changes: 3 additions & 1 deletion lib/matplotlib/backends/backend_webagg_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def handle_event(self, event):
elif e_type == 'draw':
self.draw()
elif e_type in ('button_press', 'button_release', 'motion_notify',
'figure_enter', 'figure_leave'):
'figure_enter', 'figure_leave', 'scroll'):
x = event['x']
y = event['y']
y = self.get_renderer().height - y
Expand All @@ -218,6 +218,8 @@ def handle_event(self, event):
self.enter_notify_event(xy=(x, y))
elif e_type == 'figure_leave':
self.leave_notify_event()
elif e_type == 'scroll':
self.scroll_event(x, y, event['step'])
elif e_type in ('key_press', 'key_release'):
key = event['key']

Expand Down
0