mirror of
https://github.com/sotam0316/drawNET.git
synced 2026-04-25 03:58:37 +09:00
Initial commit: drawNET Alpha v1.0 - Professional Topology Designer with Full i18n and Performance Optimizations
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { state } from '../../state.js';
|
||||
|
||||
export const uiHandlers = {
|
||||
toggleInventory: () => {
|
||||
import('../../graph/analysis.js').then(m => m.toggleInventory());
|
||||
},
|
||||
toggleProperties: () => {
|
||||
import('../../properties_sidebar/index.js').then(m => m.toggleSidebar());
|
||||
},
|
||||
toggleLayers: () => {
|
||||
import('../../ui/layer_panel.js').then(m => m.toggleLayerPanel());
|
||||
},
|
||||
editLabel: () => {
|
||||
if (!state.graph) return;
|
||||
const selected = state.graph.getSelectedCells();
|
||||
if (selected.length === 0) return;
|
||||
|
||||
import('../../properties_sidebar/index.js').then(m => {
|
||||
m.toggleSidebar(true);
|
||||
setTimeout(() => {
|
||||
const labelInput = document.getElementById('prop-label');
|
||||
if (labelInput) {
|
||||
labelInput.focus();
|
||||
labelInput.select();
|
||||
}
|
||||
}, 50);
|
||||
});
|
||||
},
|
||||
cancel: () => {
|
||||
if (!state.graph) return;
|
||||
state.graph.cleanSelection();
|
||||
import('../../properties_sidebar/index.js').then(m => m.toggleSidebar(false));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user