Skip to content

Commit

Permalink
Refactor render tree to use Octane idioms
Browse files Browse the repository at this point in the history
  • Loading branch information
chancancode committed Dec 18, 2019
1 parent 3469ece commit 252beff
Show file tree
Hide file tree
Showing 11 changed files with 377 additions and 451 deletions.
30 changes: 25 additions & 5 deletions app/controllers/application.js
Expand Up @@ -66,12 +66,32 @@ export default Controller.extend({
this.port.send('objectInspector:releaseObject', { objectId: item.objectId });
}),

showInspector: action(function() {
if (this.inspectorExpanded === false) {
this.set('inspectorExpanded', true);
// Broadcast that tables have been resized (used by `x-list`).
schedule('afterRender', () => {
this.layoutService.trigger('resize', { source: 'object-inspector' });
});
}
}),

hideInspector: action(function() {
if (this.inspectorExpanded === true) {
this.set('inspectorExpanded', false);
// Broadcast that tables have been resized (used by `x-list`).
schedule('afterRender', () => {
this.layoutService.trigger('resize', { source: 'object-inspector' });
});
}
}),

toggleInspector: action(function() {
this.toggleProperty('inspectorExpanded');
// Broadcast that tables have been resized (used by `x-list`).
schedule('afterRender', () => {
this.layoutService.trigger('resize', { source: 'object-inspector' });
});
if (this.inspectorExpanded) {
this.hideInspector();
} else {
this.showInspector();
}
}),

setActive: action(function(bool) {
Expand Down

0 comments on commit 252beff

Please sign in to comment.