Fixed initial layout of homepage. (#388)

This commit is contained in:
Philipp Horstenkamp 2023-11-16 17:26:02 +01:00 committed by GitHub
parent ce1598c42e
commit e257799f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,6 +182,7 @@ def layout() -> list[html]:
"closeness", "closeness",
id="dropdown_table_metric", id="dropdown_table_metric",
className="dropdown_style", className="dropdown_style",
persistence=True,
), ),
], ],
), ),
@ -256,6 +257,7 @@ def layout() -> list[html]:
"None", "None",
id="dropdown", id="dropdown",
className="dropdown_style", className="dropdown_style",
persistence=True,
), ),
], ],
), ),
@ -268,24 +270,21 @@ def layout() -> list[html]:
), ),
dcc.Dropdown( dcc.Dropdown(
[ [
"Spring (2d)", "Spring",
"Spring (3d)",
# "Bipartite", # "Bipartite",
"Circular (2d)", "Circular",
"Circular (3d)", "Kamada Kawai",
"Kamada Kawai (2d)",
"Kamada Kawai (3d)",
# "Planar", # "Planar",
"Random (2d)", "Random",
"Random (3d)", "Shell (only 2D)",
"Shell (2d)",
# "Spectral", # "Spectral",
"Spiral (2d)", "Spiral (only 2D)",
# "Multipartite" # "Multipartite"
], ],
"Spring (3d)", "Spring",
id="dropdown_layout", id="dropdown_layout",
className="dropdown_style", className="dropdown_style",
persistence=True,
placeholder="Select a graph layout", placeholder="Select a graph layout",
), ),
], ],
@ -303,6 +302,7 @@ def layout() -> list[html]:
1, 1,
value=1, value=1,
id="slider", id="slider",
persistence=True,
), ),
], ],
), ),
@ -319,6 +319,7 @@ def layout() -> list[html]:
daq.BooleanSwitch( daq.BooleanSwitch(
id="switch_edge_annotation", id="switch_edge_annotation",
on=False, on=False,
persistence=True,
) )
], ],
), ),
@ -374,8 +375,6 @@ def update_graph_data(
Input("slider", "value"), Input("slider", "value"),
Input("dropdown_table_metric", "value"), Input("dropdown_table_metric", "value"),
], ],
prevent_initial_call=True,
allow_duplicate=True,
) )
def update_figure( # noqa: PLR0913 def update_figure( # noqa: PLR0913
selected_metric: str, selected_metric: str,