mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
refactor: pass snippetManager to PanelResizer and update visualization on resize
This commit is contained in:
+9
-1
@@ -1,5 +1,6 @@
|
||||
export class PanelResizer {
|
||||
constructor() {
|
||||
constructor(snippetManager) {
|
||||
this.snippetManager = snippetManager;
|
||||
this.handleDragStart = this.handleDragStart.bind(this);
|
||||
this.handleDrag = this.handleDrag.bind(this);
|
||||
this.handleDragEnd = this.handleDragEnd.bind(this);
|
||||
@@ -104,6 +105,13 @@ export class PanelResizer {
|
||||
if (window.editor) {
|
||||
window.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);
|
||||
}
|
||||
}
|
||||
|
||||
normalizePanelWidths() {
|
||||
|
||||
Reference in New Issue
Block a user