private tooltip: ComponentRef<TooltipContentComponent>;
private visible: boolean;
+ private delayInProgress: boolean = false;
// -------------------------------------------------------------------------
// Constructor
@Input() tooltipDisabled: boolean;
@Input() tooltipAnimation: boolean = true;
@Input() tooltipPlacement: "top"|"bottom"|"left"|"right" = "bottom";
+ @Input() tooltipDelay: number = 1500;
// -------------------------------------------------------------------------
// Public Methods
if(this.tooltipDisabled || this.visible || this.content === "") {
return;
}
+ if (this.tooltipDelay && !this.delayInProgress) {
+ this.delayInProgress = true;
+ setTimeout(() => { this.delayInProgress && this.show() }, this.tooltipDelay);
+ return;
+ }
this.visible = true;
if (typeof this.content === "string") {
@HostListener("mouseleave")
hide(): void {
+ this.delayInProgress = false;
if (!this.visible) {
return;
}