Skip to content

Commit 4757008

Browse files
committed
+ piece of css to prettify map attributions
1 parent a0da862 commit 4757008

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def extract_number(text):
134134

135135
# %%
136136
c_map = dcc.Graph(
137-
id='map_fig', style={'height': '83vh'},
137+
id='map_fig', style={'height': '89vh'},
138138
config={'displayModeBar': True,'scrollZoom': True}
139139
)
140140

@@ -1134,7 +1134,7 @@ def update_map(n, color, size,
11341134
# legend=dict(groupclick="toggleitem",
11351135
# x=0.0, y=0.0, xanchor='left', yanchor='bottom'),
11361136
modebar_orientation='v',
1137-
margin={"r": 30, "t": 0, "l": 0, "b": 5},
1137+
margin={"r": 30, "t": 0, "l": 0, "b": 30},
11381138
modebar_add=['toggleHover', 'drawline', 'drawopenpath',
11391139
'drawclosedpath', 'drawcircle', 'drawrect',
11401140
'eraseshape', 'toggleSpikelines'],

assets/custom.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/* Move attribution block outside the map */
2+
.maplibregl-ctrl-bottom-right {
3+
position: static !important;
4+
margin-top: 5px;
5+
text-align: left;
6+
padding-right: 10px;
7+
}
8+
9+
/* Prevent it from overlapping map */
10+
.maplibregl-map > .maplibregl-control-container {
11+
position: relative;
12+
height: 0;
13+
overflow: visible;
14+
}
15+
16+
/* Hide the triangle button */
17+
.maplibregl-ctrl-attrib-button {
18+
display: none !important;
19+
}

0 commit comments

Comments
 (0)