Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
Merge pull request #17 from cgrossde/issue-16
Browse files Browse the repository at this point in the history
Fixes #16: Allow sending notifications after closeAll() was called
  • Loading branch information
Chris committed Nov 27, 2015
2 parents 5da39ad + e9b25d7 commit 6b8ac18
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ AnimationQueue.prototype.animate = function(object) {
});
};

AnimationQueue.prototype.clear = function() {
this.queue = [];
}

var config = {
width: 300,
height: 65,
Expand Down Expand Up @@ -496,13 +500,17 @@ function setStyleOnDomElement(styleObj, domElement){

function closeAll() {
// Clear out animation Queue and close windows
animationQueue = [];
animationQueue.clear();
_.forEach(activeNotifications, function(window) {
window.close();
});
_.forEach(inactiveWindows, function(window) {
window.close();
});
// Reset certain vars
nextInsertPos = {};
activeNotifications = [];
inactiveWindows = [];
}

module.exports.notify = notify;
Expand Down

0 comments on commit 6b8ac18

Please sign in to comment.