File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file.
3
3
This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
4
4
5
5
## [ Unreleased]
6
+ ### Fixed
7
+ - Offline mode will no longer delete the Jupyter Notebook's require, requirejs, and define variables.
6
8
7
9
## [ 1.9.6] - 2016-02-18
8
10
### Updated
Original file line number Diff line number Diff line change @@ -61,14 +61,14 @@ def init_notebook_mode():
61
61
62
62
global __PLOTLY_OFFLINE_INITIALIZED
63
63
if not __PLOTLY_OFFLINE_INITIALIZED :
64
- display (HTML ('<script type="text/javascript">' +
65
- # ipython's includes `require` as a global, which
66
- # conflicts with plotly.js. so, unrequire it.
67
- 'require=requirejs=define=undefined;' +
68
- '</script>' +
69
- '<script type="text/javascript">' +
64
+ display (HTML ("<script type='text/javascript'>" +
65
+ "define('plotly', function(require, exports, module) {" +
70
66
get_plotlyjs () +
71
- '</script>' ))
67
+ "});" +
68
+ "require(['plotly'], function(Plotly) {" +
69
+ "window.Plotly = Plotly;" +
70
+ "});" +
71
+ "</script>" ))
72
72
__PLOTLY_OFFLINE_INITIALIZED = True
73
73
74
74
You can’t perform that action at this time.
0 commit comments