mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
Workaround to use webgui interface from command line
This commit is contained in:
parent
3bfa6c19fa
commit
519490ecee
@ -8,6 +8,9 @@ try:
|
||||
from webgui_jupyter_widgets import BaseWebGuiScene, WebGuiDocuWidget
|
||||
import webgui_jupyter_widgets.widget as wg
|
||||
except ImportError:
|
||||
class BaseWebGuiScene:
|
||||
pass
|
||||
|
||||
wg = None
|
||||
|
||||
def encodeData( data, dtype=None, encoding='b64' ):
|
||||
@ -214,9 +217,13 @@ def GetData(mesh, args, kwargs):
|
||||
d[name] = pnew
|
||||
return d
|
||||
|
||||
base = object if wg is None else BaseWebGuiScene
|
||||
class WebGLScene(base):
|
||||
class WebGLScene(BaseWebGuiScene):
|
||||
class Widget:
|
||||
def __init__(self):
|
||||
self.value = {}
|
||||
|
||||
def __init__(self, obj, args=[], kwargs={}):
|
||||
self.widget = self.Widget()
|
||||
self.obj = obj
|
||||
self.args = args
|
||||
self.kwargs = kwargs
|
||||
|
Loading…
Reference in New Issue
Block a user