Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix console erorr, style tweaks

Jason Kent08c0457759d1
diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.css
index 3edd3552a..37dcdad5e 100644
--- a/web/css/smart-handoff.css
+++ b/web/css/smart-handoff.css
@@ -55,21 +55,26 @@
min-height: 40px;
max-height: calc(var(--vh, 1vh) * 100 - 500px);
}
+
.smart-handoff-layer-list .layer-item {
padding: 10px 15px;
-}
-.smart-handoff-layer-list .layer-item label {
- display: block;
- margin-top: -20px;
- margin-left: 25px;
-}
-
-.smart-handoff-layer-list .layer-item span {
- color: #999;
- display: block;
- margin-left: 25px;
- margin-top: 5px;
- font-size: 11px;
+ input {
+ cursor: pointer;
+ }
+ label {
+ cursor: pointer;
+ display: block;
+ margin-top: -20px;
+ margin-left: 20px;
+ }
+ span {
+ cursor: pointer;
+ color: #999;
+ display: block;
+ margin-left: 20px;
+ margin-top: 3px;
+ font-size: 11px;
+ }
}
.smart-handoff-crop-toggle {
@@ -78,8 +83,9 @@
margin-left: 52px;
}
-label[for='chk-crop-toggle'] {
+label[for='chk-crop-toggle'] span{
color: #fff;
+ cursor: pointer;
}
.granule-count {
diff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.js
index bc056fb50..4d22de526 100644
--- a/web/js/containers/sidebar/smart-handoff.js
+++ b/web/js/containers/sidebar/smart-handoff.js
@@ -240,6 +240,7 @@ class SmartHandoff extends Component {
renderLayerChoices() {
const { activeLayers } = this.props;
const { selectedLayer, currentExtent } = this.state;
+ const selectedId = selectedLayer && selectedLayer.id;
return (
<div className="smart-handoff-layer-list">
@@ -253,7 +254,7 @@ class SmartHandoff extends Component {
type="radio"
value={layer.conceptId}
name="smart-handoff-layer-radio"
- checked={selectedLayer && selectedLayer.id === layer.id}
+ checked={selectedId === layer.id}
onChange={() => this.onLayerChange(layer, currentExtent)}
/>
<label htmlFor={inputId}>{layer.title}</label>
@@ -288,7 +289,7 @@ class SmartHandoff extends Component {
x, y, x2, y2,
} = boundaries;
- return (
+ return selectedLayer && (
<>
<div className="smart-handoff-crop-toggle">
<Checkbox
@@ -331,6 +332,7 @@ class SmartHandoff extends Component {
showCoordinates
/>
)}
+ <hr />
</>
);
}
@@ -436,7 +438,6 @@ class SmartHandoff extends Component {
{this.renderLayerChoices()}
<hr />
{this.renderCropBox()}
- <hr />
{this.renderGranuleCount()}
<Button
onClick={() => {