in script.js [574:610]
function addLegend() {
const legendContainer = document.createElement('div');
legendContainer.className = 'legend-container';
// Create "exists" legend item
const existsItem = document.createElement('div');
existsItem.className = 'legend-item';
const existsIndicator = document.createElement('span');
existsIndicator.className = 'legend-indicator exists';
const existsText = document.createElement('span');
existsText.textContent = 'Exists';
existsItem.appendChild(existsIndicator);
existsItem.appendChild(existsText);
// Create "planned" legend item
const plannedItem = document.createElement('div');
plannedItem.className = 'legend-item';
const plannedIndicator = document.createElement('span');
plannedIndicator.className = 'legend-indicator not-exists';
const plannedText = document.createElement('span');
plannedText.textContent = 'Planned';
plannedItem.appendChild(plannedIndicator);
plannedItem.appendChild(plannedText);
// Add items to container
legendContainer.appendChild(existsItem);
legendContainer.appendChild(plannedItem);
// Add legend to tree view
mgTreeView.appendChild(legendContainer);
}