File tree Expand file tree Collapse file tree 1 file changed +2
-25
lines changed
packages/plotly-extension/src Expand file tree Collapse file tree 1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -13,31 +13,9 @@ import {
1313 IRenderMime
1414} from '@jupyterlab/rendermime-interfaces' ;
1515
16- import '../style/index.css ';
16+ import * as Plotly from 'plotly.js/dist/plotly ';
1717
18- namespace Private {
19-
20- declare function require ( moduleName : string ) : string ;
21-
22- /**
23- * Is plotly.js being loaded?.
24- */
25- export
26- let loadingPlotly = false ;
27-
28- /**
29- * Load plotly.js browser script.
30- */
31- export
32- function loadPlotly ( ) : void {
33- loadingPlotly = true ;
34- const script = document . createElement ( 'script' ) ;
35- script . type = 'text/javascript' ;
36- script . text = require ( 'raw-loader!plotly.js/dist/plotly.min.js' ) ;
37- document . head . appendChild ( script ) ;
38- }
39-
40- }
18+ import '../style/index.css' ;
4119
4220/**
4321 * The CSS class to add to the Plotly Widget.
@@ -72,7 +50,6 @@ class RenderedPlotly extends Widget implements IRenderMime.IRenderer {
7250 super ( ) ;
7351 this . addClass ( CSS_CLASS ) ;
7452 this . _mimeType = options . mimeType ;
75- if ( ! Private . loadingPlotly ) Private . loadPlotly ( ) ;
7653 }
7754
7855 /**
You can’t perform that action at this time.
0 commit comments