Fixed some errors with installation of extension, and added a function where the toast is closed when clicked

This commit is contained in:
Kasper Rynning-Tønnesen
2015-08-04 22:55:48 +02:00
parent 83e752c4a2
commit bba0470369
5 changed files with 28 additions and 14 deletions

View File

@@ -1848,6 +1848,26 @@ $(document).ready(function(){
}
});
hammerHandler.on('tap', function(e) {
var deltaX = e.deltaX;
var activationDistance = 80;
// If toast dragged past activation point
Vel(toast, {marginTop: '-40px', opacity: 0}, { duration: 375,
easing: 'easeOutExpo',
queue: false,
complete: function(){
if(typeof(completeCallback) === "function") {
completeCallback();
}
toast.parentNode.removeChild(toast);
}
});
});
return toast;
}
};