Implement cursor position center for egw_tooltip

This commit is contained in:
Hadi Nategh 2022-09-08 16:16:34 +02:00
parent cd3c40eaf8
commit 3435c475f5

View File

@ -37,6 +37,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
var optionsDefault = {
hideonhover: true,
position:'right',
open: function(){},
close: function(){}
};
@ -66,7 +67,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
var cursor_rect = {
left: (x - 8),
top: (y - 8),
right: (x + 8),
right: (x + (options.position == "center" ? -1 * tooltip_div.width()/2 : 8)),
bottom: (y + 8)
};