Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add unit of measure toggle

Jason Kent01d3441d8ce5
diff --git a/web/css/measure.css b/web/css/measure.css
index 962146c9b..ffe1c26ce 100644
--- a/web/css/measure.css
+++ b/web/css/measure.css
@@ -13,6 +13,14 @@
}
}
+.measure-unit-toggle {
+ border-bottom: 1px solid #ccc;
+ padding: 5px 5px 5px 27px;
+ & .custom-control-label {
+ margin-left: 34px;
+ }
+}
+
/* TODO selector name is too generic */
.tooltip {
position: relative;
diff --git a/web/js/components/measure-tool/measure-menu.js b/web/js/components/measure-tool/measure-menu.js
index 33d2fc253..8b7d804f9 100644
--- a/web/js/components/measure-tool/measure-menu.js
+++ b/web/js/components/measure-tool/measure-menu.js
@@ -39,11 +39,18 @@ class MeasureMenu extends Component {
render() {
return (
- <IconList
- list={OPTIONS_ARRAY}
- onClick={this.dispatchAction.bind(this)}
- size="small"
- />
+ <>
+ <div className="measure-unit-toggle custom-control custom-switch">
+ <label htmlFor="unit-toggle">km</label>
+ <input id="unit-toggle" className="custom-control-input" type="checkbox"/>
+ <label className="custom-control-label" htmlFor="unit-toggle">mi</label>
+ </div>
+ <IconList
+ list={OPTIONS_ARRAY}
+ onClick={this.dispatchAction.bind(this)}
+ size="small"
+ />
+ </>
);
}
}