clear rects when using form

main
Matt Huntington 3 years ago
parent 56b2e2ad38
commit eafaefe733

@ -49,6 +49,8 @@ d3.select('svg').call(dragBehavior);
d3.select('form').on('submit', function(){ d3.select('form').on('submit', function(){
d3.event.preventDefault(); d3.event.preventDefault();
d3.selectAll('rect').remove();
const lat1 = d3.select('input:first-child').node().value const lat1 = d3.select('input:first-child').node().value
const lng1 = d3.select('input:nth-child(2)').node().value const lng1 = d3.select('input:nth-child(2)').node().value
const location1 = worldProjection([lat1, lng1]); const location1 = worldProjection([lat1, lng1]);

Loading…
Cancel
Save