Solved - Duration of autoclose popups

Where would I find the code that controls the popup autoclose duration? I would like to lengthen it so messages stay for a longer duration.

I'm guessing that you're talking about the PNotify() behavior rather than the Announcements builtin plugin.


        //~~ Initialize PNotify

        PNotify.prototype.options.styling = "bootstrap2";
        PNotify.prototype.options.mouse_reset = false;
        PNotify.prototype.options.stack.firstpos1 = 40 + 20; // navbar + 20
        PNotify.prototype.options.stack.firstpos2 = 20;
        PNotify.prototype.options.stack.spacing1 = 20;
        PNotify.prototype.options.stack.spacing2 = 20;
        PNotify.prototype.options.delay = 5000;
        PNotify.prototype.options.animate_speed = "fast";

It appears to be hard-coded. A value of 5000 milliseconds is 5 seconds. I'm not sure if that means wait this long before displaying or perhaps it's the amount of time the popup is displayed.

The docs for PNotify suggest that delay is in fact involved with some source code as an example that will increase the timeout, say, by half a second:

(function() {
    PNotify.prototype.options.delay += 500;

I don't know though. This is a guess at the functionality.

Thank you OutsourcedGuru! Exactly what I needed and an override in the plugin js of delay: 15000 provides for 15 second interval without changing the static system defined delay: 5000.

1 Like

This is a good candidate for a feature request but I'm sure foosel's a bit busy fighting larger battles like Python 3.x and such. If feels like it's not big enough to merit its own plugin, to be honest.

Not wanting a plugin but I bet there are others who might want to leave messages for 30 seconds then let them go away. That would be a preference setting I would guess.

I wanted to be able to customize how long the popups stay from the M117PopUp plugin which I have started to make it into more of an Mxx plugin. Does popups on M117, M106 fan speed changes and various other things. M900 pops up etc. More just understanding what settings in S3d do during cooling etc.

1 Like

Personally, I don't watch my jobs run (other than for the first few layers). In theory, it might also be good to have them simply persist until dismissed. Take a look at the source of this, the popups created by the plugin have a user settable timeout.


1 Like