mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 21:00:34 +05:00
Also allow creating html files in Draw from jupyter notebook
This commit is contained in:
parent
cc3f27e514
commit
d9af1262a2
@ -389,6 +389,7 @@ def Draw(obj, *args, show=True, **kwargs):
|
|||||||
|
|
||||||
html = scene.GenerateHTML()
|
html = scene.GenerateHTML()
|
||||||
display(HTML(html))
|
display(HTML(html))
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
import webgui_jupyter_widgets as wjw
|
import webgui_jupyter_widgets as wjw
|
||||||
from packaging.version import parse
|
from packaging.version import parse
|
||||||
@ -400,8 +401,6 @@ def Draw(obj, *args, show=True, **kwargs):
|
|||||||
scene.Draw(
|
scene.Draw(
|
||||||
kwargs_with_defaults["width"], kwargs_with_defaults["height"]
|
kwargs_with_defaults["width"], kwargs_with_defaults["height"]
|
||||||
)
|
)
|
||||||
return scene
|
|
||||||
else:
|
|
||||||
if "filename" in kwargs_with_defaults:
|
if "filename" in kwargs_with_defaults:
|
||||||
scene.GenerateHTML(filename=kwargs_with_defaults["filename"])
|
scene.GenerateHTML(filename=kwargs_with_defaults["filename"])
|
||||||
return scene
|
return scene
|
||||||
|
Loading…
Reference in New Issue
Block a user