Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

give coords an invisible container to target

Jason Kent9942cf3dc4c8
diff --git a/web/css/map.css b/web/css/map.css
index 5d73f079e..08fde12d4 100644
--- a/web/css/map.css
+++ b/web/css/map.css
@@ -170,11 +170,16 @@
display: none;
}
-.wv-coords-map {
+.wv-coords-container {
position: absolute;
+ height: 35px;
+ width: 256px;
top: auto;
right: 10px;
bottom: 103px;
+}
+
+.wv-coords-map {
white-space: pre;
outline: none;
color: #fff;
diff --git a/web/js/components/map/__snapshots__/ol-coordinates.test.js.snap b/web/js/components/map/__snapshots__/ol-coordinates.test.js.snap
index 523f13e10..42003eefb 100644
--- a/web/js/components/map/__snapshots__/ol-coordinates.test.js.snap
+++ b/web/js/components/map/__snapshots__/ol-coordinates.test.js.snap
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`clears coordinates when mouse moves off the map 1`] = `"<div id=\\"ol-coords-case\\"></div>"`;
+exports[`clears coordinates when mouse moves off the map 1`] = `"<div id=\\"ol-coords-case\\" class=\\"wv-coords-container\\"></div>"`;
-exports[`reprojects (0,0) to (-45, 90) for EPSG:3413 1`] = `"<div id=\\"ol-coords-case\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">90.0000°, -45.0000° EPSG:3413</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
+exports[`reprojects (0,0) to (-45, 90) for EPSG:3413 1`] = `"<div id=\\"ol-coords-case\\" class=\\"wv-coords-container\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">90.0000°, -45.0000° EPSG:3413</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
-exports[`shows 20°00.000'N, 10°00.000'E when set to degrees and minutes format 1`] = `"<div id=\\"ol-coords-case\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20°00.000'N, 10°00.000'E EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
+exports[`shows 20°00.000'N, 10°00.000'E when set to degrees and minutes format 1`] = `"<div id=\\"ol-coords-case\\" class=\\"wv-coords-container\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20°00.000'N, 10°00.000'E EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
-exports[`shows coordinates of (-160, 20) when moving the mouse over wrapped 1`] = `"<div id=\\"ol-coords-case\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20.0000°, -160.0000° EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
+exports[`shows coordinates of (-160, 20) when moving the mouse over wrapped 1`] = `"<div id=\\"ol-coords-case\\" class=\\"wv-coords-container\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20.0000°, -160.0000° EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
-exports[`shows coordinates of (10, 20) when moving the mouse 1`] = `"<div id=\\"ol-coords-case\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20.0000°, 10.0000° EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
+exports[`shows coordinates of (10, 20) when moving the mouse 1`] = `"<div id=\\"ol-coords-case\\" class=\\"wv-coords-container\\"><div id=\\"coords-panel\\" class=\\"wv-coords-map wv-coords-map-btn\\"><span class=\\"map-coord\\">20.0000°, 10.0000° EPSG:4326</span><div aria-label=\\"Change coordinates format\\" class=\\"coord-btn\\"><i class=\\"coord-switch\\"></i></div></div></div>"`;
diff --git a/web/js/components/map/ol-coordinates.js b/web/js/components/map/ol-coordinates.js
index e97ae23a8..ca7e1ccc6 100644
--- a/web/js/components/map/ol-coordinates.js
+++ b/web/js/components/map/ol-coordinates.js
@@ -93,7 +93,7 @@ export default class OlCoordinates extends React.Component {
}
return (
- <div id="ol-coords-case">
+ <div id="ol-coords-case" className="wv-coords-container">
<Coordinates
format={format}
latitude={latitude}