@@ -372,6 +372,18 @@ class UIManager {
372372 } , 300 ) ;
373373 }
374374
375+ toggleSelectionEditor ( ) {
376+ const container = document . getElementById ( "selectedElementsContainer" ) ;
377+ const panel = document . getElementById ( "selectionEditorPanel" ) ;
378+ const toggleBtn = document . getElementById ( "selectionEditorToggleBtn" ) ;
379+ if ( ! container || ! panel || ! toggleBtn ) return ;
380+
381+ const isExpanded = container . classList . toggle ( "expanded" ) ;
382+ toggleBtn . textContent = isExpanded ? "▴" : "▾" ;
383+ toggleBtn . title = isExpanded ? "Collapse selection editor" : "Expand selection editor" ;
384+ toggleBtn . setAttribute ( "aria-expanded" , isExpanded ? "true" : "false" ) ;
385+ }
386+
375387 async toggleLassoSelection ( ) {
376388 const lassoWrapper = document . getElementById ( "lassoWrapper" ) ;
377389 let lassoIsActive = lassoWrapper . classList . contains ( "active" ) ;
@@ -712,6 +724,18 @@ class UIManager {
712724 const content = document . getElementById ( "stylingPanelContent" ) ;
713725 content . innerHTML = "" ;
714726 content . appendChild ( createStyleDiv ( this . cache ) ) ;
727+ this . mountSelectionEditorCards ( ) ;
728+ }
729+
730+ mountSelectionEditorCards ( ) {
731+ const selectionPanel = document . getElementById ( "selectionEditorPanel" ) ;
732+ if ( ! selectionPanel ) return ;
733+
734+ selectionPanel . innerHTML = "" ;
735+ [ "Focus Elements" , "Select Elements" , "Arrange Selection" ] . forEach ( ( cardId ) => {
736+ const card = document . getElementById ( cardId ) ;
737+ if ( card ) selectionPanel . appendChild ( card ) ;
738+ } ) ;
715739 }
716740}
717741
0 commit comments