Moves keyboard menu to centroid.
This commit is contained in:
parent
0e1a33263f
commit
0922aa2ebc
|
@ -306,8 +306,8 @@
|
||||||
var node = MENU.CurrentNode() || event.target;
|
var node = MENU.CurrentNode() || event.target;
|
||||||
if (!x && !y && node) {
|
if (!x && !y && node) {
|
||||||
var rect = node.getBoundingClientRect();
|
var rect = node.getBoundingClientRect();
|
||||||
x = rect.right;
|
x = (rect.right + rect.left) / 2;
|
||||||
y = rect.bottom;
|
y = (rect.bottom + rect.top) / 2;
|
||||||
}
|
}
|
||||||
if (x + menu.offsetWidth > document.body.offsetWidth - this.margin)
|
if (x + menu.offsetWidth > document.body.offsetWidth - this.margin)
|
||||||
{x = document.body.offsetWidth - menu.offsetWidth - this.margin}
|
{x = document.body.offsetWidth - menu.offsetWidth - this.margin}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user