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

OZG-7047 Add white spaces

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