|
10 | 10 | vtkTrackballPan, |
11 | 11 | ) |
12 | 12 | from trame.app import TrameComponent, dataclass |
| 13 | +from trame.dataclasses.colormaps import ColormapConfig |
13 | 14 | from trame.decorators import controller |
14 | 15 | from trame.ui.html import DivLayout |
15 | | -from trame.widgets import client, html, rca |
| 16 | +from trame.widgets import client, colormaps, html, rca |
16 | 17 | from trame.widgets import vuetify3 as v3 |
17 | 18 | from vtkmodules.vtkRenderingCore import ( |
18 | 19 | vtkActor, |
|
23 | 24 | vtkRenderWindowInteractor, |
24 | 25 | ) |
25 | 26 |
|
26 | | -from trame.dataclasses.colormaps import ColormapConfig |
27 | | -from trame.widgets.colormaps import HorizontalScalarBar |
28 | | -from trame_colormaps import module as colormaps_module |
29 | 27 | from e3sm_quickview.components import view as tview |
30 | 28 | from e3sm_quickview.utils import perf |
31 | 29 |
|
@@ -234,7 +232,7 @@ def _build_ui(self): |
234 | 232 | ) |
235 | 233 |
|
236 | 234 | with self.colormap.provide_as(self.name): |
237 | | - HorizontalScalarBar(self.name, popup_location="top") |
| 235 | + colormaps.HorizontalScalarBar(self.name, popup_location="top") |
238 | 236 |
|
239 | 237 |
|
240 | 238 | class ViewManager(TrameComponent): |
@@ -288,8 +286,9 @@ def __init__(self, server, source): |
288 | 286 | self._last_vars = {} |
289 | 287 | self._active_configs = {} |
290 | 288 |
|
| 289 | + # Initialize deferred widgets |
291 | 290 | rca.initialize(self.server) |
292 | | - self.server.enable_module(colormaps_module) |
| 291 | + colormaps.initialize(self.server) |
293 | 292 |
|
294 | 293 | def _on_render_start(self, *_): |
295 | 294 | if perf.is_enabled(): |
|
0 commit comments