1
0
Fork 0
mirror of https://github.com/Alamantus/Lexiconga.git synced 2025-05-23 18:40:52 +02:00
Lexiconga/src/js/displayToggles.js
2019-05-10 13:08:03 -06:00

36 lines
968 B
JavaScript

import { renderDescription, renderDetails, renderStats } from './render';
export function showSection(sectionName) {
switch (sectionName) {
case 'description': showDescription(); break;
case 'details': showDetails(); break;
case 'stats': showStats(); break;
}
}
export function hideDetailsPanel() {
document.getElementById('detailsPanel').style.display = 'none';
}
export function getIsDetailsPanelDisplayed() {
return document.getElementById('detailsPanel').style.display !== 'none';
}
function showDescription() {
const detailsPanel = document.getElementById('detailsPanel');
detailsPanel.style.display = 'block';
renderDescription();
}
function showDetails() {
const detailsPanel = document.getElementById('detailsPanel');
detailsPanel.style.display = 'block';
renderDetails();
}
function showStats() {
const detailsPanel = document.getElementById('detailsPanel');
detailsPanel.style.display = 'block';
renderStats();
}