pnotify icon indicating copy to clipboard operation
pnotify copied to clipboard

PNotify.defaultStack not work

Open mahdisky opened this issue 7 years ago • 7 comments

how to set default PNotify.defaultStack? i did this but didnt get any result

mahdisky avatar Feb 13 '18 12:02 mahdisky

What version are you using?

hperrin avatar Feb 14 '18 19:02 hperrin

v4

mahdisky avatar Feb 14 '18 20:02 mahdisky

Can you show me your code? I'm not sure what you're trying to do.

hperrin avatar Feb 20 '18 22:02 hperrin

PNotify.defaultStack = { "dir1": "down", "dir2": "left", "firstpos1": 25, "firstpos2": 25, "spacing1": 36, "spacing2": 36, "push": "top", // "context": document.body };

mahdisky avatar Feb 21 '18 04:02 mahdisky

As long as it's not on one line like that (so the comment doesn't comment out the closing }, that should work. Are you running it after loading PNotify?

hperrin avatar Feb 22 '18 01:02 hperrin

yes,can you send sample of this ?that's the position in top left and a little bit down

mahdisky avatar Feb 22 '18 05:02 mahdisky

Try it like this:

document.addEventListener('DOMContentLoaded', function() {
  PNotify.defaultStack = { "dir1": "down", "dir2": "left", "firstpos1": 25, "firstpos2": 25, "spacing1": 36, "spacing2": 36, "push": "top", "context": document.body };
});

hperrin avatar Mar 10 '18 01:03 hperrin