8000 Js fixes for key events + ipython notebooks by tacaswell · Pull Request #3965 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Js fixes for key events + ipython notebooks #3965

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 14 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
MNT : improve js code
  • Loading branch information
tacaswell committed Jan 8, 2015
commit efd0c34916e5eb0f360b89c094e4076e4415baf2
10 changes: 5 additions & 5 deletions lib/matplotlib/backends/web_backend/nbagg_mpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,19 @@ mpl.figure.prototype._init_toolbar = function() {
}


mpl.figure.prototype._canvas_extra_style = function(e){
mpl.figure.prototype._canvas_extra_style = function(el){
// this is important to make the div 'focusable
e.attr('tabindex', 0)
el.attr('tabindex', 0)
// reach out to IPython and tell the keyboard manager to turn it's self
// off when our div gets focus

// location in version 3
if (typeof IPython.notebook.keyboard_manager != 'undefined') {
IPython.notebook.keyboard_manager.register_events(e);
if (IPython.notebook.keyboard_manager) {
IPython.notebook.keyboard_manager.register_events(el);
}
else {
// location in version 2
IPython.keyboard_manager.register_events(e);
IPython.keyboard_manager.register_events(el);
}

}
Expand Down
0