diff --git a/src/pan3d/custom/contour.py b/src/pan3d/custom/contour.py index 7cc76bc..3e7e1e5 100644 --- a/src/pan3d/custom/contour.py +++ b/src/pan3d/custom/contour.py @@ -28,17 +28,16 @@ from pan3d.utils.convert import to_float, to_image from pan3d.utils.presets import PRESETS, set_preset from pan3d.widgets.pan3d_view import Pan3DView -from trame.app import get_server -from trame.decorators import TrameApp, change +from trame.app import TrameApp +from trame.decorators import change from trame.ui.vuetify3 import VAppLayout from trame.widgets import html from trame.widgets import vuetify3 as v3 -@TrameApp() -class ContourExplorer: +class ContourExplorer(TrameApp): def __init__(self, server=None, local_rendering=None): - self.server = get_server(server, client_type="vue3") + super().__init__(server, client_type="vue3") self.server.enable_module(base) self.server.enable_module(preview) diff --git a/src/pan3d/ui/analytics.py b/src/pan3d/ui/analytics.py index a94743d..7cf0a30 100644 --- a/src/pan3d/ui/analytics.py +++ b/src/pan3d/ui/analytics.py @@ -1,6 +1,6 @@ import sys -from trame.decorators import TrameApp, change +from trame.decorators import change from trame.widgets import html, plotly from trame.widgets import vuetify3 as v3 @@ -68,7 +68,6 @@ class GroupBy(Enum): } -@TrameApp() class Plotting(v3.VCard): def __init__( self, diff --git a/src/pan3d/viewers/catalog.py b/src/pan3d/viewers/catalog.py index 4e59607..e65590e 100644 --- a/src/pan3d/viewers/catalog.py +++ b/src/pan3d/viewers/catalog.py @@ -7,17 +7,16 @@ from pan3d import catalogs as pan3d_catalogs from pan3d.ui.catalog_search import CatalogSearch from pan3d.xarray.algorithm import vtkXArrayRectilinearSource -from trame.app import get_server -from trame.decorators import TrameApp, change +from trame.app import TrameApp +from trame.decorators import change from trame.ui.vuetify3 import SinglePageWithDrawerLayout from trame.widgets import html from trame.widgets import vuetify3 as v3 -@TrameApp() -class CatalogBrowser: +class CatalogBrowser(TrameApp): def __init__(self, server=None): - self.server = get_server(server) + super().__init__(server, client_type="vue3") self.current_event_loop = asyncio.get_event_loop() # dev setup