@@ -13,15 +13,14 @@ export default class ApplicationController extends Controller {
1313 * Service used to broadcast changes to the application's layout
1414 * such as toggling of the object inspector.
1515 */
16- @service ( 'layout' ) layoutService ;
16+ @service layout ;
1717 @service port ;
1818
1919 // Indicates that the extension window is focused,
2020 @tracked active = true ;
2121 @tracked isDragging = false ;
2222 @tracked contentHeight = null ;
2323 @tracked deprecationCount = 0 ;
24- @tracked inspectorExpanded = false ;
2524 @tracked inspectorWidth = 360 ;
2625 /**
2726 * Indicates if the inspector has detected an ember app.
@@ -74,39 +73,6 @@ export default class ApplicationController extends Controller {
7473 } ) ;
7574 }
7675
77- @action
78- showInspector ( ) {
79- if ( this . inspectorExpanded === false ) {
80- this . inspectorExpanded = true ;
81- // Broadcast that tables have been resized (used by `x-list`).
82- // eslint-disable-next-line ember/no-runloop
83- schedule ( 'afterRender' , ( ) => {
84- this . layoutService . trigger ( 'resize' , { source : 'object-inspector' } ) ;
85- } ) ;
86- }
87- }
88-
89- @action
90- hideInspector ( ) {
91- if ( this . inspectorExpanded === true ) {
92- this . inspectorExpanded = false ;
93- // Broadcast that tables have been resized (used by `x-list`).
94- // eslint-disable-next-line ember/no-runloop
95- schedule ( 'afterRender' , ( ) => {
96- this . layoutService . trigger ( 'resize' , { source : 'object-inspector' } ) ;
97- } ) ;
98- }
99- }
100-
101- @action
102- toggleInspector ( ) {
103- if ( this . inspectorExpanded ) {
104- this . hideInspector ( ) ;
105- } else {
106- this . showInspector ( ) ;
107- }
108- }
109-
11076 @action
11177 setActive ( bool ) {
11278 // eslint-disable-next-line ember/no-runloop
@@ -118,22 +84,20 @@ export default class ApplicationController extends Controller {
11884 @action
11985 setupContentElement ( element ) {
12086 this . contentElement = element ;
121- this . layoutService . updateContentHeight ( this . contentElement . clientHeight ) ;
87+ this . layout . updateContentHeight ( this . contentElement . clientHeight ) ;
12288 }
12389
12490 @action
12591 _windowDidResize ( ) {
12692 // eslint-disable-next-line ember/no-runloop
12793 schedule ( 'afterRender' , ( ) => {
12894 if ( ! this . isDestroyed && ! this . isDestroying ) {
129- this . layoutService . trigger ( 'resize' , {
95+ this . layout . trigger ( 'resize' , {
13096 source : 'application-controller' ,
13197 } ) ;
13298
13399 if ( this . contentElement ) {
134- this . layoutService . updateContentHeight (
135- this . contentElement . clientHeight ,
136- ) ;
100+ this . layout . updateContentHeight ( this . contentElement . clientHeight ) ;
137101 }
138102 }
139103 } ) ;
@@ -150,7 +114,7 @@ export default class ApplicationController extends Controller {
150114 this . navIsCollapsed = ! this . navIsCollapsed ;
151115 // eslint-disable-next-line ember/no-runloop
152116 schedule ( 'afterRender' , ( ) => {
153- this . layoutService . trigger ( 'resize' , { source : 'navigation' } ) ;
117+ this . layout . trigger ( 'resize' , { source : 'navigation' } ) ;
154118 } ) ;
155119 }
156120
0 commit comments