Skip to content

Commit

Permalink
Merge pull request #85 from kb3eua/patch-1
Browse files Browse the repository at this point in the history
Restart timer on mouseout
  • Loading branch information
Stabzs authored Dec 1, 2016
2 parents 0ce7e1c + 03f1521 commit 28165e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/toaster-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {Toast} from './toast';
[iconClass]="toasterconfig.iconClasses[toast.type]"
[ngClass]="toasterconfig.typeClasses[toast.type]"
(click)="click(toast)" (clickEvent)="childClick($event)"
(mouseover)="stopTimer(toast)" (mouseout)="restartTimer">
(mouseover)="stopTimer(toast)" (mouseout)="restartTimer(toast)">
</div>
</div>
`//,
Expand Down Expand Up @@ -75,7 +75,7 @@ export class ToasterContainerComponent {

restartTimer(toast: Toast) {
if (this.toasterconfig.mouseoverTimerStop) {
if (toast.timeoutId) {
if (!toast.timeoutId) {
this.configureTimer(toast);
}
} else if (toast.timeoutId === null) {
Expand Down Expand Up @@ -205,4 +205,4 @@ export class ToasterContainerComponent {
if(this.addToastSubscriber) { this.addToastSubscriber.unsubscribe(); }
if(this.clearToastsSubscriber) { this.clearToastsSubscriber.unsubscribe(); }
}
}
}

0 comments on commit 28165e9

Please sign in to comment.