Commit 3ab3caa8 authored by Eric Duminil's avatar Eric Duminil
Browse files

Possibly less broken

parent 1bf3ac9c
......@@ -161,27 +161,25 @@ const regionChooser = (function(){
li.onmouseover = function(){ regionChooser.highlightPolygon(this.feature) };
li.onmouseout = function(){ regionChooser.resetHighlight(this.feature) };
/* li.setAttribute('onmouseover', 'regionChooser.highlightPolygon(' + id + ')"');
li.setAttribute('onmouseout', 'regionChooser.resetHighlight(' + id + ')"');
*/ let checkbox = li.appendChild(document.createElement('input'));
let checkbox = li.appendChild(document.createElement('input'));
checkbox.type = 'checkbox'
checkbox.id = "citygml_" + feature.getId();
checkbox.className = "select_citygml";
checkbox.feature = feature;
checkbox.setAttribute('onclick', "regionChooser.isDownloadPossible()");
let label = li.appendChild(document.createElement('label'));
label.setAttribute('for', "citygml_" + feature.getId());
label.textContent = feature.name;
checkbox.setAttribute('onclick', "regionChooser.isDownloadPossible()");
var text = feature.name;
/* var link = '<li onmouseover="regionChooser.highlightPolygon(' + id + ')" onmouseout="regionChooser.resetHighlight(' + id +')">';
link += '<input type="checkbox" id="citygml_' + feature.getId() + '" class="select_citygml" onclick="regionChooser.isDownloadPossible();">'
+ '<label for="citygml_' + feature.getId() + '">' + feature['name'] + '</label>';
link += " (" + citygml_percentage + "%";
text += " (" + citygml_percentage + "%";
if (sketch_percentage == 100) {
link += ", all inside";
text += ", all inside";
}
*/ dataPanel[0].appendChild(li);
label.textContent = text + ")\n";
dataPanel[0].appendChild(li);
}
publicScope.highlightPolygon = function(feature) {
......@@ -204,7 +202,6 @@ const regionChooser = (function(){
//TODO: Dry
var selectedFeatures = Array.from(document.querySelectorAll("input.select_citygml")).filter(c => c.checked).map(c => c.feature);
console.log(selectedFeatures);
selectedFeatures.forEach(f => refreshStyle(f, "selected"));
document.getElementById("download_region_button").disabled = (selectedFeatures.length == 0);
......
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