Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix z-index of area select/image crop

Ed Platobcc188565c91
diff --git a/web/css/map.css b/web/css/map.css
index 065e5d8c7..a00b2260a 100644
--- a/web/css/map.css
+++ b/web/css/map.css
@@ -12,7 +12,7 @@
.wv-map-zoom {
right: 10px;
position: absolute;
- z-index: 10000;
+ z-index: 1;
background: none rgba(40, 40, 40, 0.85);
border: 1px solid #333;
margin-right: 0;
diff --git a/web/css/smart-handoff.css b/web/css/smart-handoff.css
index 82f6d1c7c..8b042e7f8 100644
--- a/web/css/smart-handoff.css
+++ b/web/css/smart-handoff.css
@@ -148,7 +148,6 @@ label[for='chk-crop-toggle'] span {
/* Overrides react image crop component */
.ReactCrop {
cursor: default !important;
- z-index: 0 !important;
}
/* Smart handoff modal */
diff --git a/web/js/components/util/image-crop.js b/web/js/components/util/image-crop.js
index 59c680993..c161e2e9e 100644
--- a/web/js/components/util/image-crop.js
+++ b/web/js/components/util/image-crop.js
@@ -58,6 +58,7 @@ export default class Crop extends React.Component {
maxHeight,
showCoordinates,
keepSelection,
+ zIndex,
} = this.props;
const { crop } = this.state;
return (
@@ -69,7 +70,7 @@ export default class Crop extends React.Component {
style={{
background:
crop.width && crop.height ? 'none' : 'rgba(0, 0, 0, 0.5)',
- zIndex: 10,
+ zIndex,
}}
imageStyle={{
width: maxWidth,
@@ -100,6 +101,7 @@ Crop.defaultProps = {
width: 30,
x: 20,
y: 10,
+ zIndex: 10,
};
Crop.propTypes = {
onChange: PropTypes.func.isRequired,
@@ -115,4 +117,5 @@ Crop.propTypes = {
width: PropTypes.number,
x: PropTypes.number,
y: PropTypes.number,
+ zIndex: PropTypes.number,
};
diff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.js
index 8d144b79d..0deaeceae 100644
--- a/web/js/containers/sidebar/smart-handoff.js
+++ b/web/js/containers/sidebar/smart-handoff.js
@@ -312,7 +312,6 @@ class SmartHandoff extends Component {
{ showBoundingBox && (
<Crop
- className="download-extent"
x={x}
y={y}
width={x2 - x}
@@ -334,6 +333,7 @@ class SmartHandoff extends Component {
}}
coordinates={coordinates}
showCoordinates
+ zIndex={1}
/>
)}
<hr />