Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add styling for layer with more than 2 palettes #375

Benjamin Kingac5306f1e938
diff --git a/web/css/layers.css b/web/css/layers.css
index a9a742d14..09f9b61a1 100644
--- a/web/css/layers.css
+++ b/web/css/layers.css
@@ -504,11 +504,14 @@
width: 300px;
}
.wv-layers-options-dialog .nav-item {
- width: 136px;
+ width: 100%;
border: 1px solid transparent;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
+.wv-layers-options-dialog .nav-item.dual {
+ width: 136px;
+}
.wv-layers-options-dialog .nav-item:hover {
border: 1px solid #fff;
}
@@ -570,7 +573,6 @@
padding: 4px;
background: #eee;
color: #000;
- border-radius: 4px;
border: 1px solid #000;
font-family: 13px/13px 'Open Sans', sans-serif;
width: max-content;
diff --git a/web/js/components/layer/settings/settings.js b/web/js/components/layer/settings/settings.js
index d1e5c8c68..2aa2409eb 100644
--- a/web/js/components/layer/settings/settings.js
+++ b/web/js/components/layer/settings/settings.js
@@ -45,8 +45,9 @@ class LayerSettings extends React.Component {
let paneElements = [];
lodashEach(legends, (legend, i) => {
const activeClass = activeIndex === i ? 'active' : '';
+ const dualStr = legends.length === 2 ? ' dual' : '';
const navItemEl = (
- <NavItem className={'settings-customs-title ' + activeClass}>
+ <NavItem className={'settings-customs-title ' + activeClass + dualStr}>
<NavLink onClick={() => this.setState({ activeIndex: i })}>
{legend.title}
</NavLink>