Skip to content
Snippets Groups Projects
Verified Commit b320f77e authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-7666 remove host listener

parent 5095f299
Branches
Tags
1 merge request!52OZG-7666 remove host listener
...@@ -23,17 +23,7 @@ ...@@ -23,17 +23,7 @@
*/ */
import { isEscapeKey, isNotNull } from '@alfa-client/tech-shared'; import { isEscapeKey, isNotNull } from '@alfa-client/tech-shared';
import { InteractivityChecker } from '@angular/cdk/a11y'; import { InteractivityChecker } from '@angular/cdk/a11y';
import { import { ComponentRef, Directive, ElementRef, HostListener, inject, Input, OnDestroy, Renderer2, ViewContainerRef, } from '@angular/core';
ComponentRef,
Directive,
ElementRef,
HostListener,
inject,
Input,
OnDestroy,
Renderer2,
ViewContainerRef,
} from '@angular/core';
import { isEmpty, isNull, uniqueId } from 'lodash-es'; import { isEmpty, isNull, uniqueId } from 'lodash-es';
import { TooltipComponent } from './tooltip.component'; import { TooltipComponent } from './tooltip.component';
...@@ -41,6 +31,7 @@ export enum TooltipPosition { ...@@ -41,6 +31,7 @@ export enum TooltipPosition {
ABOVE = 'above', ABOVE = 'above',
BELOW = 'below', BELOW = 'below',
} }
const OUTLINE_INDENT = 4; // Outline offset (2) + outline width (2) const OUTLINE_INDENT = 4; // Outline offset (2) + outline width (2)
type TooltipAriaType = 'aria-describedby' | 'aria-labelledby'; type TooltipAriaType = 'aria-describedby' | 'aria-labelledby';
...@@ -60,6 +51,7 @@ export class TooltipDirective implements OnDestroy { ...@@ -60,6 +51,7 @@ export class TooltipDirective implements OnDestroy {
this.createTooltip(value); this.createTooltip(value);
} }
@Input() tooltipPosition: TooltipPosition = TooltipPosition.BELOW; @Input() tooltipPosition: TooltipPosition = TooltipPosition.BELOW;
@Input() tooltipAriaType: TooltipAriaType = 'aria-describedby'; @Input() tooltipAriaType: TooltipAriaType = 'aria-describedby';
...@@ -93,7 +85,6 @@ export class TooltipDirective implements OnDestroy { ...@@ -93,7 +85,6 @@ export class TooltipDirective implements OnDestroy {
@HostListener('mouseleave') @HostListener('mouseleave')
@HostListener('focusout') @HostListener('focusout')
@HostListener('window:resize')
hideTooltip(): void { hideTooltip(): void {
this.hide(); this.hide();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment