Changes to legend.css to improve legend position on mobile (issue #274)
This commit is contained in:
parent
8b99b61d85
commit
b783e8f1b5
@ -4,7 +4,7 @@
|
||||
.map-legend {
|
||||
z-index: 1000;
|
||||
position: absolute;
|
||||
bottom: 55px;
|
||||
bottom: 50%;
|
||||
right: 10px;
|
||||
min-width: 12rem;
|
||||
float: right;
|
||||
@ -14,7 +14,7 @@
|
||||
border: 1px solid #fff;
|
||||
box-shadow: 0px 0px 1px 1px #222222;
|
||||
}
|
||||
@media (min-width: 380px){
|
||||
@media (min-width: 768px){
|
||||
.map-legend {
|
||||
bottom: 40px;
|
||||
}
|
||||
@ -73,7 +73,7 @@
|
||||
.expander-button {
|
||||
float: right;
|
||||
}
|
||||
@media (min-height: 670px) {
|
||||
@media (min-height: 670px) and (min-width: 768px) {
|
||||
.expander-button {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class Legend extends React.Component {
|
||||
|
||||
|
||||
onResize(e) {
|
||||
this.setState({collapseList: (e.target.outerHeight < 670)}); // magic number needs to be consistent with CSS expander-button media query
|
||||
this.setState({collapseList: (e.target.outerHeight < 670 || e.target.outerWidth < 768)}); // magic number needs to be consistent with CSS expander-button media query
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user