Skip to content

Commit

Permalink
fix(tooltip): alignment, tooltip 'Pin' function (#22)
Browse files Browse the repository at this point in the history
fix(tooltip): alignment, tooltip 'Pin' function
  • Loading branch information
teraxas authored Jul 3, 2019
2 parents 78e751f + b3b9898 commit 789f6b4
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 16 deletions.
41 changes: 30 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<div>
<i></i>
<pre>{{debugInput.debugObject | json}}</pre>
</div>

<div>
<a (click)="expanded = !expanded"><u>{{expanded ? 'Close' : 'Pin'}}</u></a>
<pre>{{debugInput.debugObject | json}}</pre>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ng-debug {
right: 0;
display: inline-block;

pre {
div {
display: none;
max-width: 80vw;
max-height: 80vh;
Expand All @@ -29,6 +29,7 @@ ng-debug {
position: absolute;
top: 0;
left: 0;
text-align: left;
}

i {
Expand Down Expand Up @@ -57,9 +58,17 @@ ng-debug {
&:hover {
z-index: 9998;

pre {
div {
display: inline-block;
}
}
}

&.expanded {
>div div {
position: fixed;
display: inline-block;

}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation, HostBinding } from '@angular/core';

@Component({
selector: 'ng-debug',
Expand All @@ -10,5 +10,8 @@ export class NgDebugIconComponent {

debugInput: { debugObject: any };

@HostBinding('class.expanded')
expanded = false;

constructor() { }
}

0 comments on commit 789f6b4

Please sign in to comment.