Permalink
Browse files

[update] config.left and config.top can be used to specify position o…

…f alert, confirm or any other box
  • Loading branch information...
Stanislav-Wolski committed Jul 30, 2012
1 parent 4d43495 commit f3f4d2920130fcf6d09e4325e50bfe509362e5fc
Showing with 2 additions and 2 deletions.
  1. +2 −2 codebase/message.js
View
@@ -135,8 +135,8 @@ if(!window.dhtmlx)
if (!config.hidden)
modality(true);
document.body.appendChild(box);
- var x = Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth) - box.offsetWidth)/2));
- var y = Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight) - box.offsetHeight)/2));
+ var x = config.left||Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth) - box.offsetWidth)/2));
+ var y = config.top||Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight) - box.offsetHeight)/2));
if (config.position == "top")
box.style.top = "-3px";
else

0 comments on commit f3f4d29

Please sign in to comment.