Skip to content

Commit 6e2cb00

Browse files
author
xhlulu
committed
Fix picking message in vehicle geometry
Former-commit-id: cd07c41
1 parent 4dd9045 commit 6e2cb00

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

  • apps/dash-vehicle-geometry

apps/dash-vehicle-geometry/app.py

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,18 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]):
191191
width=8,
192192
children=[
193193
html.Div(
194-
children=html.Div(
195-
dbc.Spinner(color="light"),
196-
style={
197-
"background-color": "#334c66",
198-
"height": "calc(100vh - 230px)",
199-
"width": "100%",
200-
"text-align": "center",
201-
"padding-top": "calc(50vh - 105px)",
202-
},
203-
),
194+
children=[
195+
html.Div(
196+
dbc.Spinner(color="light"),
197+
style={
198+
"background-color": "#334c66",
199+
"height": "calc(100vh - 230px)",
200+
"width": "100%",
201+
"text-align": "center",
202+
"padding-top": "calc(50vh - 105px)",
203+
},
204+
),
205+
],
204206
id="vtk-view-container",
205207
style={"height": "calc(100vh - 230px)", "width": "100%",},
206208
),
@@ -209,16 +211,6 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]):
209211
],
210212
style={"margin-top": "15px", "height": "calc(100vh - 230px)"},
211213
),
212-
html.Pre(
213-
id="tooltip",
214-
style={
215-
"position": "absolute",
216-
"bottom": "25px",
217-
"left": "25px",
218-
"zIndex": 1,
219-
"color": "white",
220-
},
221-
),
222214
],
223215
)
224216

@@ -240,9 +232,20 @@ def initial_loading(geometry):
240232
children=[dash_vtk.Algorithm(id="pointer", vtkClass="vtkConeSource")],
241233
)
242234

235+
tooltip = html.Pre(
236+
id="tooltip",
237+
style={
238+
"position": "absolute",
239+
"bottom": "25px",
240+
"left": "25px",
241+
"zIndex": 1,
242+
"color": "white",
243+
},
244+
)
245+
243246
return dash_vtk.View(
244247
id="vtk-view",
245-
children=vehicle_vtk + isosurfs_vtk + [cone_pointer],
248+
children=vehicle_vtk + isosurfs_vtk + [cone_pointer, tooltip],
246249
pickingModes=["hover"],
247250
)
248251

0 commit comments

Comments
 (0)