@@ -139,97 +139,93 @@ def getSeedState(self):
139139# Control UI
140140# -----------------------------------------------------------------------------
141141
142- controls = dbc .Col (
143- children = [
144- dbc .Card (
145- [
146- dbc .CardHeader ("Seeds" ),
147- dbc .CardBody (
148- [
149- html .P ("Seed line:" ),
150- dcc .Slider (
151- id = "point-1" ,
152- min = - 1 ,
153- max = 1 ,
154- step = 0.01 ,
155- value = 0 ,
156- marks = {- 1 : "-1" , 1 : "+1" },
157- ),
158- dcc .Slider (
159- id = "point-2" ,
160- min = - 1 ,
161- max = 1 ,
162- step = 0.01 ,
163- value = 0 ,
164- marks = {- 1 : "-1" , 1 : "+1" },
165- ),
166- html .Br (),
167- html .P ("Line resolution:" ),
168- dcc .Slider (
169- id = "seed-resolution" ,
170- min = 5 ,
171- max = 50 ,
172- step = 1 ,
173- value = 10 ,
174- marks = {5 : "5" , 50 : "50" },
175- ),
176- ]
177- ),
178- ]
179- ),
180- dbc .Card (
181- [
182- dbc .CardHeader ("Color By" ),
183- dbc .CardBody (
184- [
185- html .P ("Field name" ),
186- dcc .Dropdown (
187- id = "color-by" ,
188- options = [
189- {"label" : "p" , "value" : "p" },
190- {"label" : "Rotation" , "value" : "Rotation" },
191- {"label" : "U" , "value" : "U" },
192- {"label" : "Vorticity" , "value" : "Vorticity" },
193- {"label" : "k" , "value" : "k" },
194- ],
195- value = "p" ,
196- ),
197- html .Br (),
198- html .P ("Color Preset" ),
199- dcc .Dropdown (
200- id = "preset" ,
201- options = preset_as_options ,
202- value = "erdc_rainbow_bright" ,
203- ),
204- ]
205- ),
206- ]
207- ),
208- ]
209- )
142+ controls = [
143+ dbc .Card (
144+ [
145+ dbc .CardHeader ("Seeds" ),
146+ dbc .CardBody (
147+ [
148+ html .P ("Seed line:" ),
149+ dcc .Slider (
150+ id = "point-1" ,
151+ min = - 1 ,
152+ max = 1 ,
153+ step = 0.01 ,
154+ value = 0 ,
155+ marks = {- 1 : "-1" , 1 : "+1" },
156+ ),
157+ dcc .Slider (
158+ id = "point-2" ,
159+ min = - 1 ,
160+ max = 1 ,
161+ step = 0.01 ,
162+ value = 0 ,
163+ marks = {- 1 : "-1" , 1 : "+1" },
164+ ),
165+ html .Br (),
166+ html .P ("Line resolution:" ),
167+ dcc .Slider (
168+ id = "seed-resolution" ,
169+ min = 5 ,
170+ max = 50 ,
171+ step = 1 ,
172+ value = 10 ,
173+ marks = {5 : "5" , 50 : "50" },
174+ ),
175+ ]
176+ ),
177+ ]
178+ ),
179+ html .Br (),
180+ dbc .Card (
181+ [
182+ dbc .CardHeader ("Color By" ),
183+ dbc .CardBody (
184+ [
185+ html .P ("Field name" ),
186+ dcc .Dropdown (
187+ id = "color-by" ,
188+ options = [
189+ {"label" : "p" , "value" : "p" },
190+ {"label" : "Rotation" , "value" : "Rotation" },
191+ {"label" : "U" , "value" : "U" },
192+ {"label" : "Vorticity" , "value" : "Vorticity" },
193+ {"label" : "k" , "value" : "k" },
194+ ],
195+ value = "p" ,
196+ ),
197+ html .Br (),
198+ html .P ("Color Preset" ),
199+ dcc .Dropdown (
200+ id = "preset" ,
201+ options = preset_as_options ,
202+ value = "erdc_rainbow_bright" ,
203+ ),
204+ ]
205+ ),
206+ ]
207+ ),
208+ ]
210209
211210# -----------------------------------------------------------------------------
212211# App UI
213212# -----------------------------------------------------------------------------
214213
215214app .layout = dbc .Container (
216215 fluid = True ,
216+ style = {"margin-top" : "15px" , "height" : "calc(100vh - 30px)" },
217217 children = [
218- html .H1 ("dash_vtk rendering with VTK processing" ),
219- html .Hr (),
220218 dbc .Row (
221219 [
222- dbc .Col (width = 4 , children = [ controls ], ),
220+ dbc .Col (width = 4 , children = controls ),
223221 dbc .Col (
224222 width = 8 ,
225223 children = [
226- html .Div (
227- vtk_view ,
228- style = {"height" : "calc(80vh - 20px)" , "width" : "100%" },
229- )
224+ html .Div (vtk_view , style = {"height" : "100%" , "width" : "100%" })
230225 ],
231226 ),
232- ]
227+ ],
228+ style = {"height" : "100%" },
233229 ),
234230 ],
235231)
0 commit comments