Skip to content

Commit

Permalink
add legend for adaptation page
Browse files Browse the repository at this point in the history
  • Loading branch information
chjch committed Feb 29, 2024
1 parent 79c517f commit d2fd30b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
Binary file added app/assets/image/AdaptLegend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 13 additions & 11 deletions app/pages/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@
),
],
style={
"bottom": "70px",
"bottom": "60px",
"left": "45px",
"width": "15%",
"max-width": "200px",
"width": "20%",
"max-width": "250px",
"min-width": "160px",
"height": "auto",
"position": "absolute",
Expand Down Expand Up @@ -604,6 +604,8 @@ def update_map_legend_content(pathname):
html.Li([html.Span(className="tile-level7"), "18.1 - 27 ft"]),
html.Li([html.Span(className="tile-level8"), "> 27 ft"]),
], "Depth of flooding"
elif pathname == "/adaptation":
return html.Img(src="/assets/image/AdaptLegend.png"), "Adaptation Plan"
else:
return [
html.P(
Expand Down Expand Up @@ -671,14 +673,14 @@ def hide_map_expand_btn(pathname):
return "d-none"


@callback(
Output("legend-button", "className"),
[Input("sub-path", "pathname")],
)
def hide_legend_button(pathname):
pathname = "/" + pathname.split("/")[-1]
if pathname == "/adaptation":
return "d-none"
# @callback(
# Output("legend-button", "className"),
# [Input("sub-path", "pathname")],
# )
# def hide_legend_button(pathname):
# pathname = "/" + pathname.split("/")[-1]
# if pathname == "/adaptation":
# return "d-none"


# add callback for toggling the collapse on small screens
Expand Down

0 comments on commit d2fd30b

Please sign in to comment.