Skip to content
Snippets Groups Projects
Commit f78e6641 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7047 Add white spaces

parent ed6abd7e
Branches
Tags
No related merge requests found
...@@ -39,7 +39,10 @@ export class TooltipDirective implements OnDestroy { ...@@ -39,7 +39,10 @@ export class TooltipDirective implements OnDestroy {
@HostListener('mouseenter') @HostListener('mouseenter')
@HostListener('focusin') @HostListener('focusin')
createTooltip(): void { createTooltip(): void {
if (isNotNull(this.componentRef)) return; if (isNotNull(this.componentRef)) {
return;
}
const nativeElement: HTMLElement = this.elementRef.nativeElement; const nativeElement: HTMLElement = this.elementRef.nativeElement;
const attachedToFocused: boolean = nativeElement.contains(document.activeElement); const attachedToFocused: boolean = nativeElement.contains(document.activeElement);
this.componentRef = this.viewContainerRef.createComponent(TooltipComponent); this.componentRef = this.viewContainerRef.createComponent(TooltipComponent);
...@@ -63,7 +66,10 @@ export class TooltipDirective implements OnDestroy { ...@@ -63,7 +66,10 @@ export class TooltipDirective implements OnDestroy {
} }
setTooltipProperties(attachedToFocused = false): void { setTooltipProperties(attachedToFocused = false): void {
if (isNull(this.componentRef)) return; if (isNull(this.componentRef)) {
return;
}
const { left, right, bottom } = this.elementRef.nativeElement.getBoundingClientRect(); const { left, right, bottom } = this.elementRef.nativeElement.getBoundingClientRect();
this.componentRef.instance.left = (right + left) / 2; this.componentRef.instance.left = (right + left) / 2;
this.componentRef.instance.top = attachedToFocused ? bottom + OUTLINE_INDENT : bottom; this.componentRef.instance.top = attachedToFocused ? bottom + OUTLINE_INDENT : bottom;
...@@ -88,7 +94,10 @@ export class TooltipDirective implements OnDestroy { ...@@ -88,7 +94,10 @@ export class TooltipDirective implements OnDestroy {
} }
destroy(): void { destroy(): void {
if (isNull(this.componentRef)) return; if (isNull(this.componentRef)) {
return;
}
this.componentRef.destroy(); this.componentRef.destroy();
this.componentRef = null; this.componentRef = null;
this.removeAriaDescribedBy(); this.removeAriaDescribedBy();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment