Skip to content

Commit

Permalink
#158 color switch: cases editor
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Aug 24, 2021
1 parent 1b89796 commit b2ba877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions simccs_maptool/templates/simccs_maptool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@

var geojsonMarkerOptions_green = {
radius: 8,
fillColor: "green",
fillColor: "blue",
color: "#000",
weight: 1,
opacity: 1,
Expand Down Expand Up @@ -694,7 +694,7 @@
layer.on('click', function (e) {
var target_id = selection_green.indexOf(e.target)
if (target_id >=0 ) {e.target.setStyle(geojsonMarkerOptions_green);selection_green.splice(target_id,1);}
else {e.target.setStyle({weight:3,fillColor:"LawnGreen",radius:12});
else {e.target.setStyle({weight:3,fillColor:"#blue",radius:12});
selection_green.push(e.target);}
document.dispatchEvent(new Event("sink-selection-change"));
})};
Expand Down Expand Up @@ -2296,7 +2296,7 @@ <h5 class="modal-title">Generate MPS file</h5>
//clear selection array first
selection_green = [];
case_sinkLayer.eachLayer(function(layer) {
layer.setStyle({weight:3,fillColor:"LawnGreen",radius:12});
layer.setStyle({weight:3,fillColor:"#blue",radius:12});
selection_green.push(layer);
});
document.dispatchEvent(new Event("sink-selection-change"));
Expand Down Expand Up @@ -2538,7 +2538,7 @@ <h5 class="modal-title">Generate MPS file</h5>
selection_green = [];
case_sinkLayer.eachLayer(function(layer) {
var contains = turf.inside(layer.toGeoJSON(), draw_layer.toGeoJSON());
if (contains){layer.setStyle({weight:3,fillColor:"LawnGreen",radius:12});
if (contains){layer.setStyle({weight:3,fillColor:"#blue",radius:12});
selection_green.push(layer);} else {layer.setStyle(geojsonMarkerOptions_green);};
});}
if (type == "saline") {
Expand Down

0 comments on commit b2ba877

Please sign in to comment.