File tree Expand file tree Collapse file tree 2 files changed +9
-26
lines changed
Expand file tree Collapse file tree 2 files changed +9
-26
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ export default class ScriptView extends MessagePanelView {
1818 this . scrollTimeout = null ;
1919 this . ansiFilter = new AnsiFilter ( ) ;
2020 this . headerView = headerView ;
21- this . position = this . parsePositionConfig ( atom . config . get ( 'script.position' ) ) ;
21+ // Use 'bottom' as the default position, because that was
22+ // the behaviour before the position became configurable:
23+ this . position = 'bottom' ;
2224 atom . config . observe ( 'script.position' , ( newVal ) => {
23- this . position = this . parsePositionConfig ( newVal ) ;
25+ this . position = newVal ;
2426 } ) ;
2527
2628 this . showInTab = this . showInTab . bind ( this ) ;
@@ -31,25 +33,6 @@ export default class ScriptView extends MessagePanelView {
3133 linkPaths . listen ( this . body ) ;
3234 }
3335
34- parsePositionConfig ( value ) {
35- // Get the configured position of the view as one of the
36- // valid values of the MessagePanelView.position parameter.
37- switch ( value ) {
38- case 'Top' :
39- return 'top' ;
40- case 'Bottom' :
41- return 'bottom' ;
42- case 'Left' :
43- return 'left' ;
44- case 'Right' :
45- return 'right' ;
46- default :
47- // Use bottom as the default, because that was the behaviour
48- // before the position became configurable.
49- return 'bottom' ;
50- }
51- }
52-
5336 addShowInTabIcon ( ) {
5437 const icon = $$ ( function ( ) {
5538 this . div ( {
Original file line number Diff line number Diff line change @@ -54,12 +54,12 @@ export const config = {
5454 description : 'Position of the panel with script output. \
5555 (Changes to this value will be applied upon reopening the panel.)' ,
5656 type : 'string' ,
57- default : 'Bottom ' ,
57+ default : 'bottom ' ,
5858 enum : [
59- 'Top ' ,
60- 'Bottom ' ,
61- 'Left ' ,
62- 'Right ' ,
59+ 'top ' ,
60+ 'bottom ' ,
61+ 'left ' ,
62+ 'right ' ,
6363 ] ,
6464 } ,
6565}
You can’t perform that action at this time.
0 commit comments