Skip to content

Commit

Permalink
#115 cancel style function
Browse files Browse the repository at this point in the history
  • Loading branch information
webgisdeveloper committed Nov 15, 2021
1 parent aa0a4ee commit 5f3b5a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion simccs_maptool/static/js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,20 @@ function modifystyle(stylelayerid) {

stylediv.innerHTML +="<br>";
stylediv.innerHTML += '<button type="button" class="btn btn-primary btn-sm">Update Style</button>';
stylediv.innerHTML += '<button type="button" class="btn btn-primary btn-sm">Cancel</button>';
stylediv.innerHTML += '<button type="button" class="btn btn-primary btn-sm" onclick="cancel_style('+stylelayerid+')">Cancel</button>';
stylediv.innerHTML += "<br>";

// show style
stylediv.style.display = "block";

}

function cancel_style(stylelayerid){
var legenddiv = document.getElementById(stylelayerid + "_legend");
legenddiv.style.display = "block";
var stylediv = document.getElementById(stylelayerid + "_style");
stylediv.style.display = "none";
}
// for source
function sourceOnEachFeature(feature, layer) {
//bind click
Expand Down

0 comments on commit 5f3b5a4

Please sign in to comment.