feat: add StorageManager, VisualizationManager, UIManager, EditorManager, and update PanelResizer for improved snippet handling and visualization

This commit is contained in:
2025-01-19 03:46:25 +02:00
parent 9bb476c135
commit 811d981ab9
6 changed files with 208 additions and 142 deletions
+7 -6
View File
@@ -102,15 +102,16 @@ export class PanelResizer {
document.removeEventListener('mouseup', this.handleDragEnd);
// Trigger Monaco editor resize
if (window.editor) {
window.editor.layout();
if (this.snippetManager.editorManager.editor) {
this.snippetManager.editorManager.editor.layout();
}
// Update visualization after resize is complete
if (this.snippetManager && typeof this.snippetManager.updateVisualization === 'function') {
// Get the current editor value and update visualization
const editorValue = this.snippetManager.editor.getValue();
this.snippetManager.updateVisualization(editorValue);
try {
const editorValue = this.snippetManager.editorManager.getValue();
this.snippetManager.visualizationManager.updateVisualization(editorValue);
} catch (e) {
console.error('Error updating visualization after resize:', e);
}
}