diff --git a/docs/getting_started/lol.html b/docs/getting_started/lol.html
new file mode 100644
index 0000000..8fe9ede
--- /dev/null
+++ b/docs/getting_started/lol.html
@@ -0,0 +1 @@
+HELLO HTML
diff --git a/docs/getting_started/study.ipynb b/docs/getting_started/study.ipynb
index db48f12..af7ca02 100644
--- a/docs/getting_started/study.ipynb
+++ b/docs/getting_started/study.ipynb
@@ -154,14 +154,14 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 8,
"id": "0df1511e-565d-45d0-93a8-adafbfaaaefa",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "842f7d395ae045efa313f91bda29eef0",
+ "model_id": "bc6d176108fb414bad62d341a984d211",
"version_major": 2,
"version_minor": 0
},
@@ -176,6 +176,14 @@
"source": [
"vis = show(mdp, show_editor=False, layout=Layout(\"layouts/pinkgreen.json\"))"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "id": "caa359bf-4263-41f7-9222-f28d8325d218",
+ "metadata": {},
+ "outputs": [],
+ "source": []
}
],
"metadata": {
diff --git a/stormvogel/visjs.py b/stormvogel/visjs.py
index e71d56e..9bb794b 100644
--- a/stormvogel/visjs.py
+++ b/stormvogel/visjs.py
@@ -2,7 +2,6 @@
import IPython.display as ipd
import ipywidgets as widgets
-import html
import stormvogel.displayable
import stormvogel.html_templates
import stormvogel.communication_server
@@ -155,25 +154,30 @@ def generate_html(self) -> str:
).replace("__SIZES__", sizes)
return html
- def generate_iframe(self) -> str:
+ def generate_iframe(self) -> ipd.IFrame:
"""Generate an iframe for the network, using the html."""
- return f"""
- """
+ return ipd.IFrame(
+ src="lol.html",
+ width=self.width + self.EXTRA_PIXELS,
+ height=self.height + self.EXTRA_PIXELS,
+ )
+ # return f"""
+ # """
def show(self) -> None:
"""Display the network on the output that was specified at initialization, otherwise simply display it."""
iframe = self.generate_iframe()
with self.output: # Display the iframe within the Output.
ipd.clear_output()
- ipd.display(ipd.HTML(iframe))
+ ipd.display(iframe)
self.maybe_display_output()
with self.debug_output:
logging.info("Called Network.show")
@@ -183,7 +187,7 @@ def reload(self) -> None:
iframe = self.generate_iframe()
with self.output:
ipd.clear_output()
- ipd.display(ipd.HTML(iframe))
+ ipd.display(iframe)
with self.debug_output:
logging.info("Called Network.reload")