sciactive / pnotify

Beautiful JavaScript notifications with Web Notifications support.
https://sciactive.com/pnotify/
Apache License 2.0
3.65k stars 513 forks source link

animate_speed is not working? #254

Closed kushal-tech closed 7 years ago

kushal-tech commented 8 years ago

Notification is not gone within 500ms. Where I did wrong ? new PNotify({ title: false, text: errorText, type: errorType, styling: 'bootstrap3', animate_speed: 500 });

steven-pribilinskiy commented 7 years ago

I've noticed that a class ui-pnotify-fade-500 is added, but there are no css rules exists for such class. Perhaps it's assumed that one will add the css rule (missing in documentation)

.ui-pnotify.ui-pnotify-fade-500 {
    transition: opacity .5s linear;
    opacity: 0;
}
.ui-pnotify.ui-pnotify-fade-500.ui-pnotify.ui-pnotify-move {
    transition: opacity .5s linear, left .5s ease, top .5s ease, right .5s ease, bottom .5s ease;
}
hperrin commented 7 years ago

This option was taken out when PNotify started using all CSS based animations, but I forgot to remove it from the documentation. That was my bad.

hperrin commented 7 years ago

@pribilinskiy That's a good solution. I can include that in the documentation. Thank you.

hperrin commented 7 years ago

Or, not the option itself, but the including a number of ms part was taken out. It now just supports "fast", "normal", and "slow" by default.