You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug Per Call position value override doesn't work as expected. Position set in the override options obj is disregarded in some cases. If multiple notifiers are used, the first position to get used (by either) becomes permanent after the first call regardless of position on all subsequent calls.
To Reproduce
Here's a fun demo:
varnotiLeft=newAWN({position:"top-left"});varnotiRight=newAWN({position:"top-right"});// All notifications from notiRight show up on the leftfunctionleftFirst(){notiLeft.warning("To the left to the left!")notiRight.warning("Everything you own")notiRight.warning("In a box on the Left")}// All notifications from notiLeft show up on the right.functionrightFirst(){notiRight.warning("That's Riggggght!")notiLeft.warning("This too!!!")notiLeft.warning("Wrong but also right!"))}//Position override fails on notiLeftfunctionoverrideNotiLeft(){notiLeft("All my Homies use Right... But here I am stuck on the Left",{position:"top-right"})}//Postition override fails on notiRightfunctionoverrideNotiRight(){notiRight("All my Homies use Left... But here I am stuck on the Right",{position:"top-left"})}setTimeout(()=>{// leftFirst()// rightFirst()// overrideNotiLeft()// overrideNotiRight()},2000
Expected behavior
Low effort solution, docs explain position can only be set once. Library console.warns you if you try.
Slightly cooler solution, dedicated containers for each position to support different notif locations/positions
Desktop (please complete the following information):
Linux - Chromium/Electron - Latest-ish
💖 Love the lib, could maybe contribute in the future. In the meantime plan to kick over a $100 donation soon.
The text was updated successfully, but these errors were encountered:
Describe the bug
Per Call position value override doesn't work as expected. Position set in the override options obj is disregarded in some cases. If multiple notifiers are used, the first position to get used (by either) becomes permanent after the first call regardless of position on all subsequent calls.
To Reproduce
Here's a fun demo:
Expected behavior
Low effort solution, docs explain position can only be set once. Library console.warns you if you try.
Slightly cooler solution, dedicated containers for each position to support different notif locations/positions
Desktop (please complete the following information):
Linux - Chromium/Electron - Latest-ish
💖 Love the lib, could maybe contribute in the future. In the meantime plan to kick over a $100 donation soon.
The text was updated successfully, but these errors were encountered: