Skip to content

Commit

Permalink
Merge pull request #10 from ARR8/patch-1
Browse files Browse the repository at this point in the history
Automatically check radio button of new district
  • Loading branch information
rene78 authored Oct 25, 2018
2 parents e513a72 + 7454476 commit d37df16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function addDistrict() {
}
itemCounter++;
//console.log(itemCounter);
var item = '<div id="item_'+itemCounter+'" class="item"><div class=checkmark><input type="radio" name="selected"><span class="tooltiptext">Activate district to add/remove polygons</span></div><div class=title><input type="text" class="dname" placeholder="Please enter district name" value="District '+itemCounter+'"></div><div class=delete onclick="removeDistrict(this)"><img src="img/Octagon_delete.svg" alt="Delete"><span class="tooltiptext">Click to delete district</span></div></div>';
var item = '<div id="item_'+itemCounter+'" class="item"><div class=checkmark><input type="radio" name="selected" checked><span class="tooltiptext">Activate district to add/remove polygons</span></div><div class=title><input type="text" class="dname" placeholder="Please enter district name" value="District '+itemCounter+'"></div><div class=delete onclick="removeDistrict(this)"><img src="img/Octagon_delete.svg" alt="Delete"><span class="tooltiptext">Click to delete district</span></div></div>';
var content = document.getElementById('add-district');
content.insertAdjacentHTML('beforebegin', item);

Expand Down Expand Up @@ -285,4 +285,4 @@ function createOutput() {
}
}
document.getElementById("textareabox").innerHTML = mapshape;
}
}

0 comments on commit d37df16

Please sign in to comment.