Page 1 of 1

nuMessage left position

Posted: Tue May 08, 2018 4:24 pm
by toms
Hi,

Messages shown with nuMessage() appear too much to the right of the screen or even outside the visible bounds of the document under these circumstances:

- if the browser is not full size
- If the developer console is visible (left or right docked)
- if the taskbar is not at the bottom of the screen but left or right docked

It looks like this, the message only becomes visible if you scroll to the right:
offscreen.png
Fix for nuform.js, function nuMessage(), to center the message within the html document (and not the screen)

Replace this line

Code: Select all

var l		= (screen.width - widest) / 2;
With this line:

Code: Select all

var l		= ($(document).width() - widest) / 2;
After applying the fix, the message box is centered:
centered.png

Re: nuMessage left position

Posted: Wed May 09, 2018 12:21 am
by admin
toms,

Nice Fix!

It's now on Github

Steven

Re: nuMessage left position

Posted: Wed May 09, 2018 5:50 pm
by toms
Thanks!

Re: nuMessage left position

Posted: Thu May 10, 2018 12:03 am
by admin
.