From 127ebc5f0be979c52847a6427a2ada3b11fc4352 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Mon, 22 Feb 2016 17:14:21 -0800 Subject: [PATCH 1/2] Don't clobber the Notebook's require/requirejs/define instances --- plotly/offline/offline.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index 89df61a57f6..6981bead02c 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -61,14 +61,14 @@ def init_notebook_mode(): global __PLOTLY_OFFLINE_INITIALIZED if not __PLOTLY_OFFLINE_INITIALIZED: - display(HTML('' + - '')) + "});" + + "require(['plotly'], function(Plotly) {" + + "window.Plotly = Plotly;" + + "});" + + "")) __PLOTLY_OFFLINE_INITIALIZED = True From 5de037682df672ab6c83a2bd020c4e0ec67b7679 Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Tue, 23 Feb 2016 14:04:38 -0800 Subject: [PATCH 2/2] Add changelog statement --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc09a54fe98..b4c1b5c766a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- Offline mode will no longer delete the Jupyter Notebook's require, requirejs, and define variables. ## [1.9.6] - 2016-02-18 ### Updated