@@ -145,8 +145,7 @@ class SecondaryPanes extends Component<Props> {
145145 opened : prefs . scopesVisible ,
146146 onToggle : opened => {
147147 prefs . scopesVisible = opened ;
148- } ,
149- shouldOpen : ( ) => this . props . isPaused
148+ }
150149 } ;
151150 }
152151
@@ -160,6 +159,28 @@ class SecondaryPanes extends Component<Props> {
160159 } ;
161160 }
162161
162+ getCallStackItem ( ) {
163+ return {
164+ header : L10N . getStr ( "callStack.header" ) ,
165+ className : "call-stack-pane" ,
166+ component : Frames ,
167+ opened : prefs . callStackVisible ,
168+ onToggle : opened => {
169+ prefs . callStackVisible = opened ;
170+ }
171+ } ;
172+ }
173+
174+ getBreakpointsItem ( ) {
175+ return {
176+ header : L10N . getStr ( "breakpoints.header" ) ,
177+ className : "breakpoints-pane" ,
178+ buttons : [ this . breakpointDropdown ( ) , this . renderBreakpointsToggle ( ) ] ,
179+ component : Breakpoints ,
180+ opened : true
181+ } ;
182+ }
183+
163184 breakpointDropdown ( ) {
164185 if ( ! features . breakpointsDropdown ) {
165186 return ;
@@ -183,28 +204,15 @@ class SecondaryPanes extends Component<Props> {
183204 }
184205
185206 getStartItems ( ) {
186- const scopesContent : any = this . props . horizontal
187- ? this . getScopeItem ( )
188- : null ;
189- const items : Array < SecondaryPanesItems > = [
190- {
191- header : L10N . getStr ( "breakpoints.header" ) ,
192- className : "breakpoints-pane" ,
193- buttons : [ this . breakpointDropdown ( ) , this . renderBreakpointsToggle ( ) ] ,
194- component : Breakpoints ,
195- opened : true
196- } ,
197- {
198- header : L10N . getStr ( "callStack.header" ) ,
199- className : "call-stack-pane" ,
200- component : Frames ,
201- opened : prefs . callStackVisible ,
202- onToggle : opened => {
203- prefs . callStackVisible = opened ;
204- }
205- } ,
206- scopesContent
207- ] ;
207+ const items : Array < SecondaryPanesItems > = [ ] ;
208+ items . push ( this . getBreakpointsItem ( ) ) ;
209+
210+ if ( this . props . isPaused ) {
211+ if ( this . props . horizontal ) {
212+ items . push ( this . getScopeItem ( ) ) ;
213+ }
214+ items . push ( this . getCallStackItem ( ) ) ;
215+ }
208216
209217 if ( isEnabled ( "eventListeners" ) ) {
210218 items . push ( {
@@ -236,7 +244,7 @@ class SecondaryPanes extends Component<Props> {
236244 getEndItems ( ) {
237245 const items : Array < SecondaryPanesItems > = [];
238246
239- if ( ! this . props . horizontal ) {
247+ if (!this.props.horizontal && this . props . isPaused ) {
240248 items . unshift ( this . getScopeItem ( ) ) ;
241249 }
242250
0 commit comments