Commit f1f87790 authored by duminil's avatar duminil
Browse files

Reset polygon while drawing

parent b89abe89
......@@ -183,17 +183,19 @@ function displayInfo() {
draw.on('drawend', function(e) {
displayInfo();
reset_btn.disabled = false;
send_btn.disabled = false;
});
$('#reset').click(function() {
// TODO: Should also remove current drawing if polygon isn't finished
$('#dataPanel').empty();
featureOverlay.getFeatures().clear();
intersections.clear();
reset_btn.disabled = true;
send_btn.disabled = true;
try {
draw.finishDrawing();
} finally {
$('#dataPanel').empty();
featureOverlay.getFeatures().clear();
intersections.clear();
reset_btn.disabled = true;
send_btn.disabled = true;
}
});
$('#send').click(function() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment