mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20: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()
|
||||
display(HTML(html))
|
||||
return
|
||||
else:
|
||||
import webgui_jupyter_widgets as wjw
|
||||
from packaging.version import parse
|
||||
@ -400,11 +401,9 @@ def Draw(obj, *args, show=True, **kwargs):
|
||||
scene.Draw(
|
||||
kwargs_with_defaults["width"], kwargs_with_defaults["height"]
|
||||
)
|
||||
return scene
|
||||
else:
|
||||
if "filename" in kwargs_with_defaults:
|
||||
scene.GenerateHTML(filename=kwargs_with_defaults["filename"])
|
||||
return scene
|
||||
if "filename" in kwargs_with_defaults:
|
||||
scene.GenerateHTML(filename=kwargs_with_defaults["filename"])
|
||||
return scene
|
||||
|
||||
|
||||
def _DrawDocu(obj, *args, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user