Skip to content

Commit

Permalink
FIX: Restore webagg backend following the merge of widget nbagg backend
Browse files Browse the repository at this point in the history
FIX: Restore webagg backend following the merge of widget nbagg backend
  • Loading branch information
tacaswell committed May 5, 2016
2 parents 0c07515 + 61b7621 commit 27a6e41
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_webagg.py
Expand Up @@ -262,7 +262,7 @@ def __init__(self, url_prefix=''):
(url_prefix + r'/?', self.AllFiguresPage,
{'url_prefix': url_prefix}),

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

# Sends images and events to the browser, and receives
# events from the browser
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_webagg_core.py
Expand Up @@ -531,7 +531,7 @@ def get_javascript(cls, stream=None):

@classmethod
def get_static_file_path(cls):
return os.path.join(os.path.dirname(__file__), 'web_backend', 'js')
return os.path.join(os.path.dirname(__file__), 'web_backend')

def _send_event(self, event_type, **kwargs):
payload = {'type': event_type}
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/web_backend/all_figures.html
Expand Up @@ -6,8 +6,8 @@
<link rel="stylesheet" href="{{ prefix }}/_static/jquery/css/themes/base/jquery-ui.min.css" >
<script src="{{ prefix }}/_static/jquery/js/jquery-1.11.3.min.js"></script>
<script src="{{ prefix }}/_static/jquery/js/jquery-ui.min.js"></script>
<script src="{{ prefix }}/_static/mpl_tornado.js"></script>
<script src="{{ prefix }}/mpl.js"></script>
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
<script src="{{ prefix }}/js/mpl.js"></script>

<script>
{% for (fig_id, fig_manager) in figures %}
Expand Down
Expand Up @@ -5,8 +5,8 @@
// We can't proceed until these Javascript files are fetched, so
// we fetch them synchronously
$.ajaxSetup({async: false});
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/_static/mpl_tornado.js");
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/mpl.js");
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/_static/js/mpl_tornado.js");
$.getScript("http://" + window.location.hostname + ":{{ port }}{{prefix}}/js/mpl.js");
$.ajaxSetup({async: true});

function init_figure{{ fig_id }}(e) {
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/backends/web_backend/single_figure.html
Expand Up @@ -6,8 +6,8 @@
<link rel="stylesheet" href="{{ prefix }}/_static/jquery/css/themes/base/jquery-ui.min.css" >
<script src="{{ prefix }}/_static/jquery/js/jquery-1.11.3.min.js"></script>
<script src="{{ prefix }}/_static/jquery/js/jquery-ui.min.js"></script>
<script src="{{ prefix }}/_static/mpl_tornado.js"></script>
<script src="{{ prefix }}/mpl.js"></script>
<script src="{{ prefix }}/_static/js/mpl_tornado.js"></script>
<script src="{{ prefix }}/js/mpl.js"></script>
<script>
$(document).ready(
function() {
Expand Down

0 comments on commit 27a6e41

Please sign in to comment.