diff --git a/plugins/contours/public/ContoursPanel.jsx b/plugins/contours/public/ContoursPanel.jsx
index 5b246807..a684e632 100644
--- a/plugins/contours/public/ContoursPanel.jsx
+++ b/plugins/contours/public/ContoursPanel.jsx
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import Storage from 'webodm/classes/Storage';
import L from 'leaflet';
import './ContoursPanel.scss';
@@ -15,9 +16,13 @@ export default class ContoursPanel extends React.Component {
super(props);
this.state = {
- error: ""
+ error: "",
+ interval: Storage.getItem("last_contours_interval") || "1",
+ customInterval: Storage.getItem("last_contours_custom_interval") || "1",
+ layer: "",
+ projection: Storage.getItem("last_contours_projection") || "4326",
+ customProjection: Storage.getItem("last_contours_custom_projection") || "4326",
};
-
}
componentDidMount(){
@@ -45,12 +50,107 @@ export default class ContoursPanel extends React.Component {
// });
}
+ handleSelectInterval = e => {
+ this.setState({interval: e.target.value});
+ }
+
+ handleSelectLayer = e => {
+ this.setState({layer: e.target.value});
+ }
+
+ handleChangeCustomInterval = e => {
+ this.setState({customInterval: e.target.value});
+ }
+
+ handleSelectProjection = e => {
+ this.setState({projection: e.target.value});
+ }
+
+ handleChangeCustomProjection = e => {
+ this.setState({customProjection: e.target.value});
+ }
+
render(){
- const { error } = this.state;
+ const { error, interval, customInterval, layer,
+ projection, customProjection } = this.state;
+ const intervalValues = [0.25, 0.5, 1, 1.5, 2];
return (
Contours
+
+
+
+
+
+
+
+
+ {interval === "custom" ?
+
+ : ""}
+
+
+
+
+
+
+
+
+
+ {projection === "custom" ?
+
+ : ""}
+
+
+
);
}
}
\ No newline at end of file
diff --git a/plugins/contours/public/ContoursPanel.scss b/plugins/contours/public/ContoursPanel.scss
index 064e7178..31346957 100644
--- a/plugins/contours/public/ContoursPanel.scss
+++ b/plugins/contours/public/ContoursPanel.scss
@@ -1,6 +1,7 @@
.leaflet-control-contours .contours-panel{
padding: 6px 10px 6px 6px;
background: #fff;
+ min-width: 250px;
.close-button{
display: inline-block;
@@ -17,14 +18,56 @@
left: 2px;
&:hover{
- opacity: 0.8;
+ opacity: 0.7;
cursor: pointer;
}
}
.title{
- font-weight: bold;
- font-size: 1.2em;
+ font-size: 120%;
margin-right: 60px;
}
+
+ hr{
+ clear: both;
+ margin: 6px 0px;
+ border-color: #ddd;
+ }
+
+ label{
+ padding-top: 5px;
+ }
+
+ select, input{
+ height: auto;
+ padding: 4px;
+ }
+
+ input.custom-interval{
+ width: 80px;
+ }
+
+ *{
+ font-size: 12px;
+ }
+
+ .row.form-group.form-inline{
+ margin-bottom: 8px;
+ }
+
+ .dropdown-menu{
+ a{
+ display: inline;
+ padding-top: 8px;
+ padding-bottom: 8px;
+ }
+ }
+
+ .btn-preview{
+ margin-right: 8px;
+ }
+
+ .action-buttons{
+ margin-top: 12px;
+ }
}
diff --git a/plugins/contours/public/icon.png b/plugins/contours/public/icon.png
index 8bb42766..21c9708c 100644
Binary files a/plugins/contours/public/icon.png and b/plugins/contours/public/icon.png differ
diff --git a/plugins/contours/public/icon.svg b/plugins/contours/public/icon.svg
index 547d356e..88e0d74a 100644
--- a/plugins/contours/public/icon.svg
+++ b/plugins/contours/public/icon.svg
@@ -28,11 +28,11 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="3.959798"
- inkscape:cx="-65.608277"
- inkscape:cy="16.007396"
+ inkscape:zoom="1.979899"
+ inkscape:cx="-153.03452"
+ inkscape:cy="0.31522247"
inkscape:document-units="mm"
- inkscape:current-layer="g9575"
+ inkscape:current-layer="g831"
showgrid="false"
units="px"
inkscape:window-width="1920"
@@ -48,7 +48,7 @@
image/svg+xml
-
+
@@ -69,18 +69,24 @@
id="g9575"
transform="matrix(1.1918583,0,0,1.1960416,-1.0686423,-56.918136)"
style="stroke-width:0.53201765">
-
-
+
+
+
+
diff --git a/plugins/contours/public/icon@2x.png b/plugins/contours/public/icon@2x.png
index 4383a872..c3cf42ab 100644
Binary files a/plugins/contours/public/icon@2x.png and b/plugins/contours/public/icon@2x.png differ