Skip to content

Commit

Permalink
Use window.setTimeout to resolve node/typings issue
Browse files Browse the repository at this point in the history
See this thread for context:
TypeStrong/atom-typescript#1053
  • Loading branch information
returnlytom committed Aug 10, 2017
1 parent c436499 commit b9e5889
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class TooltipDirective{
}

this.showDelay = this.delay || this.showDelay;
this.showTimeoutId = setTimeout(() => {
this.showTimeoutId = window.setTimeout(() => {
if (this.tooltip){
this.tooltip.className += " ng-tooltip-show";
}
Expand All @@ -73,7 +73,7 @@ export class TooltipDirective{

if (this.tooltip){
this.tooltip.classList.remove("ng-tooltip-show");
this.hideTimeoutId = setTimeout(() => {
this.hideTimeoutId = window.setTimeout(() => {
this.tooltip.parentNode.removeChild(this.tooltip);
this.tooltip = null;
}, this.hideDelay);
Expand Down Expand Up @@ -111,4 +111,4 @@ export class TooltipDirective{
this.tooltip.style.top = (this.elemPosition.top + scrollY) + elemHeight/2 - this.tooltip.clientHeight/2+'px';
}
}
}
}

0 comments on commit b9e5889

Please sign in to comment.