-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Allow for the option of a CDN in offline mode #475
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
Conversation
Pinging @briehl, in case you have any extra feedback on the API for the KBase uses... |
@@ -193,7 +208,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly', | |||
|
|||
plot_html, plotdivid, width, height = _plot_html( | |||
figure_or_data, show_link, link_text, validate, | |||
'100%', 525, global_requirejs=True) | |||
'100%', 525, global_requirejs=__PLOTLY_USE_CDN) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yankev : Should not this be opposite? I havent looked at the complete code, but if __PLOTLY_USE_CDN
is True
, should not global_requirejs=False
?
I'm pretty sure @tarzzz's comment is right - might want to switch, or change the check for |
script_inject = ( | ||
'' | ||
'<script>' | ||
# 'if(!window.Plotly) {{' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these meant to be uncommented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were some persistence and notebook sharing issues from time to time when I left them in. So I just took them out for now.
@yankev : Looks good.. |
@yankev looks good to me too 💃 |
'<script>' | ||
'requirejs.config({' | ||
'paths: { ' | ||
'\'plotly\': [\'https://cdn.plot.ly/plotly-latest.min\']},' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this supposed to be https://cdn.plot.ly/plotly-latest.min.js
? Are you missing the ".js
"?
@chriddyp First attempt at it. Couldn't get it to work out.
Notes:
<script src ..>
for loading plotlyjs.What happens: