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