Revision 60885
Added by Konstantinos Triantafyllou about 3 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/landing-utils/showIdentifiers.component.ts | ||
---|---|---|
1 | 1 |
import { |
2 |
AfterViewInit, |
|
2 |
AfterViewInit, ChangeDetectorRef,
|
|
3 | 3 |
Component, |
4 | 4 |
Directive, |
5 | 5 |
ElementRef, |
... | ... | |
56 | 56 |
properties: EnvProperties = properties; |
57 | 57 |
@ViewChildren("content", { read: ElementRef }) types: QueryList<ElementRef>; |
58 | 58 |
|
59 |
constructor(private cdr: ChangeDetectorRef) { |
|
60 |
} |
|
61 |
|
|
59 | 62 |
@HostListener('window:resize', ['$event']) |
60 | 63 |
onResize(event) { |
61 | 64 |
this.checkLarge(); |
... | ... | |
70 | 73 |
if(typeof document !== "undefined") { |
71 | 74 |
this.keys.forEach(key => { |
72 | 75 |
let type = this.types.find(type => type.nativeElement.id === key); |
73 |
this.large.set(key, type && type.nativeElement.offsetHeight > overflow) |
|
76 |
this.large.set(key, type && type.nativeElement.offsetHeight > overflow);
|
|
74 | 77 |
}); |
78 |
this.cdr.detectChanges(); |
|
75 | 79 |
} |
76 | 80 |
} |
77 | 81 |
|
Also available in: Unified diff
[Library | Trunk]: Fix html condition error on change detections