Skip to content

Commit 61b7621

Browse files
committed
Restore webagg backend following the merge of widget nbagg backend
1 parent 6656143 commit 61b7621

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lib/matplotlib/backends/backend_webagg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ def __init__(self, url_prefix=''):
262262
(url_prefix + r'/?', self.AllFiguresPage,
263263
{'url_prefix': url_prefix}),
264264

265-
(url_prefix + r'/mpl.js', self.MplJs),
265+
(url_prefix + r'/js/mpl.js', self.MplJs),
266266

267267
# Sends images and events to the browser, and receives
268268
# events from the browser

lib/matplotlib/backends/backend_webagg_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def get_javascript(cls, stream=None):
531531

532532
@classmethod
533533
def get_static_file_path(cls):
534-
return os.path.join(os.path.dirname(__file__), 'web_backend', 'js')
534+
return os.path.join(os.path.dirname(__file__), 'web_backend')
535535

536536
def _send_event(self, event_type, **kwargs):
537537
payload = {'type': event_type}

lib/matplotlib/backends/web_backend/all_figures.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<link rel="stylesheet" href="{{ prefix }}/_static/jquery/css/themes/base/jquery-ui.min.css" >
77
<script src="{{ prefix }}/_static/jquery/js/jquery-1.11.3.min.js"></script>
88
<script src="{{ prefix }}/_static/jquery/js/jquery-ui.min.js"></script>
9-
<script src="{{ prefix }}/_static/mpl_tornado.js"></script>
10-
<script src="{{ prefix }}/mpl.js"></script>
9+
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
10+
<script src="{{ prefix }}/js/mpl.js"></script>
1111

1212
<script>
1313
{% for (fig_id, fig_manager) in figures %}

lib/matplotlib/backends/web_backend/ipython_inline_figure.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// We can't proceed until these Javascript files are fetched, so
66
// we fetch them synchronously
77
$.ajaxSetup({async: false});
8-
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/_static/mpl_tornado.js");
9-
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/mpl.js");
8+
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/_static/js/mpl_tornado.js");
9+
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/js/mpl.js");
1010
$.ajaxSetup({async: true});
1111

1212
function init_figure{{ fig_id }}(e) {

lib/matplotlib/backends/web_backend/single_figure.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<link rel="stylesheet" href="{{ prefix }}/_static/jquery/css/themes/base/jquery-ui.min.css" >
77
<script src="{{ prefix }}/_static/jquery/js/jquery-1.11.3.min.js"></script>
88
<script src="{{ prefix }}/_static/jquery/js/jquery-ui.min.js"></script>
9-
<script src="{{ prefix }}/_static/mpl_tornado.js"></script>
10-
<script src="{{ prefix }}/mpl.js"></script>
9+
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
10+
<script src="{{ prefix }}/js/mpl.js"></script>
1111
<script>
1212
$(document).ready(
1313
function() {

0 commit comments

Comments
 (0)