Skip to content

Commit 53f3f0a

Browse files
committed
[jupyter] remove wrong div closure from html
Also remove no-longer used code for file It is now shared between file browsing and drawing (cherry picked from commit 4ebe73a)
1 parent 8a6edf9 commit 53f3f0a

1 file changed

Lines changed: 0 additions & 42 deletions

File tree

  • bindings/pyroot/pythonizations/python/ROOT/_jupyroot/helpers

bindings/pyroot/pythonizations/python/ROOT/_jupyroot/helpers/utils.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989

9090
_jsCode = """
9191
{jsDivHtml}
92-
</div>
9392
<script>
9493
function process_{jsDivId}() {{
9594
function execCode(Core) {{
@@ -119,47 +118,6 @@
119118
</script>
120119
"""
121120

122-
123-
_jsFileCode = """
124-
<div style="width: 100%; height: {jsCanvasHeight}px; position: relative">
125-
<div id="{jsDivId}">
126-
</div>
127-
</div>
128-
<script>
129-
function process_{jsDivId}() {{
130-
function showFile(Core) {{
131-
Core.settings.HandleKeys = false;
132-
const binaryString = atob('{fileBase64}');
133-
const bytes = new Uint8Array(binaryString.length);
134-
for (let i = 0; i < binaryString.length; i++)
135-
bytes[i] = binaryString.charCodeAt(i);
136-
Core.buildGUI('{jsDivId}','notebook').then(h => h.openRootFile(bytes.buffer));
137-
}}
138-
const servers = ['/static/', 'https://root.cern/js/7.11.0/', 'https://jsroot.gsi.de/7.11.0/' ],
139-
path = 'build/jsroot';
140-
if (typeof JSROOT !== 'undefined')
141-
showFile(JSROOT);
142-
else if (typeof requirejs !== 'undefined') {{
143-
servers.forEach((s,i) => {{ servers[i] = s + path; }});
144-
requirejs.config({{ paths: {{ 'jsroot' : servers }} }})(['jsroot'], showFile);
145-
}} else {{
146-
const config = document.getElementById('jupyter-config-data');
147-
if (config)
148-
servers[0] = (JSON.parse(config.innerHTML || '{{}}')?.baseUrl || '/') + 'static/';
149-
else
150-
servers.shift();
151-
function loadJsroot() {{
152-
return !servers.length ? 0 : import(servers.shift() + path + '.js').catch(loadJsroot).then(() => showFile(JSROOT));
153-
}}
154-
loadJsroot();
155-
}}
156-
}}
157-
process_{jsDivId}();
158-
</script>
159-
"""
160-
161-
162-
163121
TBufferJSONErrorMessage = "The TBufferJSON class is necessary for JS visualisation to work and cannot be found. Did you enable the http module (-D http=ON for CMake)?"
164122

165123

0 commit comments

Comments
 (0)