Skip to content

Commit

Permalink
Add prefix to dropdown options for hierarchical complexity variables
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Jan 9, 2025
1 parent 86b61e3 commit 2e8d4b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion seshat/apps/core/static/core/js/map_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,11 @@ function populateVariableDropdown(variables) {
Object.entries(vars).forEach(([variable, details]) => {
const option = document.createElement('option');
option.value = details.formatted;
option.textContent = details.full_name;
if (hierarchicalComplexityVariables.includes(variable)) {
option.textContent = "Hierarchical Complexity: " + details.full_name;
} else {
option.textContent = details.full_name;
}
optgroup.appendChild(option);
});
optgroup.innerHTML = [...optgroup.children].sort((a, b) => a.textContent.localeCompare(b.textContent)).map(e => e.outerHTML).join('');
Expand Down

0 comments on commit 2e8d4b1

Please sign in to comment.