Skip to content

Commit

Permalink
Better default styles and added blur emit on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
sconix committed Nov 22, 2017
1 parent c7ac0c3 commit 843fa0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/ace.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ace {
/* stylelint-enable */

&.ace {
width: 100%;
height: 100%;

& > .ace_editor {
display: block;
width: 100%;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/ace.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export class AceDirective implements OnInit, DoCheck, OnDestroy, OnChanges {

ngOnDestroy() {
if (this.instance) {
if (this.instance.isFocused()) {
this.blur.emit();
}

delete this.instance;

this.instance = null;
Expand Down

0 comments on commit 843fa0c

Please sign in to comment.