Skip to content

Commit

Permalink
ui(dynamic component): fix dynamic component scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourget committed Mar 14, 2019
1 parent fd4158f commit e7e131f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
14 changes: 9 additions & 5 deletions demo/src/app/common/tool/tool.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {

import { BehaviorSubject } from 'rxjs';

import { LanguageService } from '@igo2/core';
import {
OnUpdateInputs,
Tool,
Expand All @@ -18,7 +19,7 @@ import {
} from '@igo2/common';

@ToolComponent({
name: 'salutation',
name: 'demo-salutation',
title: 'Salutation',
icon: 'person',
options: {name: 'Jack'}
Expand All @@ -43,7 +44,7 @@ export class AppSalutationToolComponent implements OnUpdateInputs {
}

@ToolComponent({
name: 'about',
name: 'demo-about',
title: 'About',
icon: 'info'
})
Expand Down Expand Up @@ -73,10 +74,13 @@ export class AppToolComponent implements OnInit, OnDestroy {
return this.activeTool$.value ? this.activeTool$.value.title : 'Toolbox';
}

constructor(private toolService: ToolService) {}
constructor(
private toolService: ToolService,
private languageService: LanguageService
) {}

ngOnInit() {
this.toolbox.setToolbar(['salutation', 'about']);
this.toolbox.setToolbar(['demo-salutation', 'demo-about']);
this.toolbox.setTools(this.toolService.getTools());
}

Expand All @@ -85,7 +89,7 @@ export class AppToolComponent implements OnInit, OnDestroy {
}

activateSalutationTool() {
this.toolbox.activateTool('salutation', {name: 'Bob'});
this.toolbox.activateTool('demo-salutation', {name: 'Bob'});
}

}
2 changes: 2 additions & 0 deletions demo/src/app/common/tool/tool.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatButtonModule, MatIconModule, MatCardModule } from '@angular/material';

import { IgoLanguageModule } from '@igo2/core';
import { IgoPanelModule, IgoToolModule } from '@igo2/common';

import {
Expand All @@ -23,6 +24,7 @@ import { AppToolRoutingModule } from './tool-routing.module';
MatButtonModule,
MatIconModule,
MatCardModule,
IgoLanguageModule,
IgoPanelModule,
IgoToolModule.forRoot()
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
:host {
display: block;
overflow: hidden;
width: 100%;
height: 100%;
}
4 changes: 4 additions & 0 deletions packages/common/src/lib/tool/toolbox/toolbox.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ igo-actionbar:not(.with-title) {
igo-actionbar ::ng-deep igo-list {
overflow: inherit;
}

igo-dynamic-outlet {
overflow: auto;
}

0 comments on commit e7e131f

Please sign in to comment.