Initial commit: drawNET Alpha v1.0 - Professional Topology Designer with Full i18n and Performance Optimizations

This commit is contained in:
leeyj
2026-03-22 22:37:24 +09:00
commit 5cea93e317
192 changed files with 14449 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { state } from '../state.js';
export function initSidebar() {
const sidebar = document.getElementById('sidebar');
const sidebarToggle = document.getElementById('sidebar-toggle');
const footer = document.querySelector('.sidebar-footer');
if (sidebarToggle && sidebar) {
const toggleSidebar = () => {
sidebar.classList.toggle('collapsed');
if (footer) {
footer.style.display = sidebar.classList.contains('collapsed') ? 'none' : 'block';
}
setTimeout(() => {
if (state.graph) state.graph.zoomToFit({ padding: 50 });
}, 350);
};
sidebarToggle.addEventListener('click', toggleSidebar);
const searchIcon = document.querySelector('.search-container i');
if (searchIcon) {
searchIcon.addEventListener('click', () => {
if (sidebar.classList.contains('collapsed')) {
toggleSidebar();
document.getElementById('asset-search').focus();
}
});
}
}
}