Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Restore webagg backend following the merge of widget nbagg backend #6370

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 1 commit into from
May 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_webagg.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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