Skip to content

Commit

Permalink
hide components/polity switch
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardchalstrey1 committed Dec 18, 2024
1 parent 412e4f8 commit ac9f553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions seshat/apps/core/templates/core/polity_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ <h2 class="h2 text-dark federicka-medium">
<script src="{% static 'core/js/map_functions.js' %}"></script>
<script>

// Hide components/polity switch for now so "Polity components" is always displayed
document.getElementById('switchPolitiesComponentsFieldset').style.display = 'none';

// Allows scrolling on the componentLegend div
const componentLegend = document.getElementById('componentLegend');
componentLegend.addEventListener('wheel', function (event) {
Expand Down
11 changes: 8 additions & 3 deletions seshat/apps/core/templates/core/world_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ <h1 class="text-teal sliderDate" id="sliderDate2"></h1>
</select>
<div class="display-info-container">
ℹ️
</div><br><br>
</div>
</fieldset>
<fieldset id="switchPoliticalBoundariesFieldset" style="display: block">
<label for="baseMapOnly">Hide unselected</label>
<input type="checkbox" id="hideUnselected" name="hideUnselected" onclick=plotPolities() disabled>
<label for="baseMapOnly">Select all</label>
Expand Down Expand Up @@ -550,6 +552,9 @@ <h2>How to use the Seshat World Map</h2>
<script src="{% static 'core/js/map_functions.js' %}"></script>
<script>

// Hide components/polity switch for now so "Full polities" is always displayed
document.getElementById('switchPolitiesComponentsFieldset').style.display = 'none';

// Set the default base map to Cesium Globe on mobile devices
// Also place the enter year input field where the slider normally is
var onMobile = false;
Expand Down Expand Up @@ -861,9 +866,9 @@ <h2>How to use the Seshat World Map</h2>

// Show the switchPolitiesComponents dropdown if the variable is polity
if (variable == 'polity') {
document.getElementById('switchPolitiesComponentsFieldset').style.display = 'block';
document.getElementById('switchPoliticalBoundariesFieldset').style.display = 'block';
} else {
document.getElementById('switchPolitiesComponentsFieldset').style.display = 'none';
document.getElementById('switchPoliticalBoundariesFieldset').style.display = 'none';
}

// Load capital info if not already loaded
Expand Down

0 comments on commit ac9f553

Please sign in to comment.