@@ -217,7 +217,11 @@ class Editor extends PureComponent<Props, State> {
217
217
218
218
shortcuts . on ( L10N . getStr ( "toggleBreakpoint.key" ) , this . onToggleBreakpoint ) ;
219
219
shortcuts . on (
220
- L10N . getStr ( "toggleCondPanel.key" ) ,
220
+ L10N . getStr ( "toggleCondPanel.breakpoint.key" ) ,
221
+ this . onToggleConditionalPanel
222
+ ) ;
223
+ shortcuts . on (
224
+ L10N . getStr ( "toggleCondPanel.logPoint.key" ) ,
221
225
this . onToggleConditionalPanel
222
226
) ;
223
227
shortcuts . on ( L10N . getStr ( "sourceTabs.closeTab.key" ) , this . onClosePress ) ;
@@ -249,7 +253,8 @@ class Editor extends PureComponent<Props, State> {
249
253
const shortcuts = this . context . shortcuts ;
250
254
shortcuts . off ( L10N . getStr ( "sourceTabs.closeTab.key" ) ) ;
251
255
shortcuts . off ( L10N . getStr ( "toggleBreakpoint.key" ) ) ;
252
- shortcuts . off ( L10N . getStr ( "toggleCondPanel.key" ) ) ;
256
+ shortcuts . off ( L10N . getStr ( "toggleCondPanel.breakpoint.key" ) ) ;
257
+ shortcuts . off ( L10N . getStr ( "toggleCondPanel.logPoint.key" ) ) ;
253
258
shortcuts . off ( searchAgainPrevKey ) ;
254
259
shortcuts . off ( searchAgainKey ) ;
255
260
}
@@ -301,11 +306,13 @@ class Editor extends PureComponent<Props, State> {
301
306
e . stopPropagation ( ) ;
302
307
e . preventDefault ( ) ;
303
308
const line = this . getCurrentLine ( ) ;
309
+
304
310
if ( typeof line !== "number" ) {
305
311
return ;
306
312
}
307
313
308
- this . toggleConditionalPanel ( line ) ;
314
+ const isLog = key === L10N . getStr ( "toggleCondPanel.logPoint.key" ) ;
315
+ this . toggleConditionalPanel ( line , isLog ) ;
309
316
} ;
310
317
311
318
onEditorScroll = throttle ( this . props . updateViewport , 100 ) ;
@@ -454,7 +461,7 @@ class Editor extends PureComponent<Props, State> {
454
461
}
455
462
}
456
463
457
- toggleConditionalPanel = line => {
464
+ toggleConditionalPanel = ( line , log : boolean = false ) => {
458
465
const {
459
466
conditionalPanelLocation,
460
467
closeConditionalPanel,
@@ -470,11 +477,14 @@ class Editor extends PureComponent<Props, State> {
470
477
return ;
471
478
}
472
479
473
- return openConditionalPanel ( {
474
- line : line ,
475
- sourceId : selectedSource . id ,
476
- sourceUrl : selectedSource . url
477
- } ) ;
480
+ return openConditionalPanel (
481
+ {
482
+ line : line ,
483
+ sourceId : selectedSource . id ,
484
+ sourceUrl : selectedSource . url
485
+ } ,
486
+ log
487
+ ) ;
478
488
} ;
479
489
480
490
shouldScrollToLocation ( nextProps ) {
0 commit comments