Open ghost opened 10 years ago
So if you were to call a closeAll and then a new growl it would be positioned to far down, is that what you are saying?
Yes, exactly.
I am going to be working on the plugin this weekend. I'll add this to the list of things I have to do! Thank you very much for letting me know.
Thank you very much for your working and plugin! ^_^
Any update on this? I'm on a rush, and I cannot stop to fix it now. Does anyone have a (personal) solution?
Thanks.
I have been working on this issue, it is actually one of the reasons I haven't updated the plugin. I am sorry that I do not have an update for when this may be completed though.
Actually, hold that thought. Please check back tomorrow I think I may have a solution. If I add a class such as growl-closing to the closing growls then when I am determine the position for new growls I only check for growls that do not have the class growl-closing
This is just an idea, I have to test it out.
LeoDutra, instead of
return offsetAmt = Math.max(offsetAmt, parseInt($(this).css(settings.placement.from)) + $(this).outerHeight() + settings.spacing);
I use
return offsetAmt;
152 line. ;) But it's a workaround for my needs. May be it will be useful for you too.
su-bzero, but wouldn't that not stop you from stacking growls notifications?
mouse0270, I keep only one notification for a moment. ;) So yes, it's a dirty hack, but it allowed me to complete my project already.
Looks like there's a fork fixing it with an option: https://github.com/nickrussler/bootstrap-growl-1/commit/42812090b75264ce48d1282adc7222cac1ca0349 (nop, It did not help)
And thank you @su-bzero.
Thank God, you guys are fast.
I'll surely help you on this nice project, on my spare time.
Hum... @su-bzero wins. His tip solved. "Outstanding"
Please just keep in mind that using that technique you will not be able to display more then one growl in each position.
Right.
I am also having this issue. It's not terrible but would be nice to make sure the positioning resets. Maybe the closeAll should stop any jQuery animations so that there isn't a placement delay?
I'm using this:
closeAll = function(options) {
// HACKED force
var containers = $('[data-growl="container"]').hide();
containers.css('top', -containers.outerHeight());
if (!options) {
$('[data-growl="container"]').find('[data-growl="dismiss"]').trigger('click');
}else{
$('[data-growl="container"][data-growl-position="'+options+'"]').find('[data-growl="dismiss"]').trigger('click');
}
}
Hello.
After using $.growl(false, {command: 'closeAll'}) a new one growl has a placement after the previous growl's position until the "delay" event.