@@ -171,6 +171,13 @@ class UIManager {
171171 this . hideBottomBar ( ) ;
172172 queryBtn . classList . remove ( "highlight" ) ;
173173 }
174+
175+ // Wait for CSS transition to complete (300ms) before resizing graph canvas
176+ setTimeout ( ( ) => {
177+ if ( this . cache . graph ) {
178+ this . cache . graph . resize ( ) ;
179+ }
180+ } , 300 ) ;
174181 }
175182
176183 async toggleDataEditor ( ) {
@@ -190,6 +197,13 @@ class UIManager {
190197 }
191198
192199 await this . hideLoading ( ) ;
200+
201+ // Wait for CSS transition to complete (300ms) before resizing graph canvas
202+ setTimeout ( ( ) => {
203+ if ( this . cache . graph ) {
204+ this . cache . graph . resize ( ) ;
205+ }
206+ } , 300 ) ;
193207 }
194208
195209 showEditor ( editorType ) {
@@ -288,7 +302,7 @@ class UIManager {
288302 shadowBar . style . height = clampedHeight + 'px' ;
289303 }
290304
291- function handleMouseUp ( e ) {
305+ const handleMouseUp = ( e ) => {
292306 if ( ! isResizing ) return ;
293307
294308 isResizing = false ;
@@ -307,6 +321,11 @@ class UIManager {
307321
308322 bottomBar . style . height = finalHeight + 'px' ;
309323 mainContent . style . height = newMainHeight + 'px' ;
324+
325+ // Resize graph canvas after manual resize (no transition, resize immediately)
326+ if ( this . cache . graph ) {
327+ this . cache . graph . resize ( ) ;
328+ }
310329 }
311330
312331 shadowBar . style . display = 'none' ;
@@ -332,17 +351,25 @@ class UIManager {
332351 toggleStylingPanel ( ) {
333352 const rightSidebar = document . getElementById ( "rightSidebar" ) ;
334353 const styleBtn = document . getElementById ( "styleToggleBtn" ) ;
354+ const outerGraphContainer = document . getElementById ( "outerGraphContainer" ) ;
335355 const isActive = rightSidebar . classList . contains ( "active" ) ;
336356
337357 if ( isActive ) {
338358 rightSidebar . classList . remove ( "active" ) ;
339359 styleBtn . classList . remove ( "highlight" ) ;
340- this . info ( "Styling panel closed ") ;
360+ outerGraphContainer . classList . remove ( "styling- panel-active ") ;
341361 } else {
342362 rightSidebar . classList . add ( "active" ) ;
343363 styleBtn . classList . add ( "highlight" ) ;
344- this . info ( "Styling panel opened ") ;
364+ outerGraphContainer . classList . add ( "styling- panel-active ") ;
345365 }
366+
367+ // Wait for CSS transition to complete (300ms) before resizing graph canvas
368+ setTimeout ( ( ) => {
369+ if ( this . cache . graph ) {
370+ this . cache . graph . resize ( ) ;
371+ }
372+ } , 300 ) ;
346373 }
347374
348375 async toggleLassoSelection ( ) {
@@ -559,9 +586,7 @@ class UIManager {
559586 div . append ( row ) ;
560587 sliderOrDropdown . appendListeners ( ) ;
561588 }
562- const staticStyleDiv = document . getElementById ( "staticStyleDiv" ) ;
563- staticStyleDiv . innerHTML = "" ;
564- staticStyleDiv . appendChild ( createStyleDiv ( this . cache ) ) ;
589+
565590 this . manageDynamicWidgets ( ) ;
566591 this . handleEditModeUIChanges ( ) ;
567592 this . cache . qm . updateQueryTextArea ( ) ;
@@ -701,11 +726,7 @@ class UIManager {
701726 buildStylingPanelUI ( ) {
702727 const content = document . getElementById ( "stylingPanelContent" ) ;
703728 content . innerHTML = "" ;
704-
705- const placeholder = document . createElement ( "div" ) ;
706- placeholder . className = "alert-info" ;
707- placeholder . innerHTML = "<p>Styling controls will be added here.</p>" ;
708- content . appendChild ( placeholder ) ;
729+ content . appendChild ( createStyleDiv ( this . cache ) ) ;
709730 }
710731}
711732
0 commit comments